/* ============================================
   Modern Products Section Styles
   ============================================ */

.modern-products-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
}

.modern-products-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(var(--primary-color-rgb, 0, 123, 255), 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(var(--primary-color-rgb, 0, 123, 255), 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.modern-products-section .container {
    position: relative;
    z-index: 1;
}

/* Section Header */
.modern-section-header {
    margin-bottom: 60px;
}

.modern-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 8px 20px;
    background: rgba(var(--primary-color-rgb, 0, 123, 255), 0.1);
    border-radius: 30px;
    border: 1px solid rgba(var(--primary-color-rgb, 0, 123, 255), 0.2);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color, #007bff);
    border-radius: 50%;
    display: inline-block;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.badge-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color, #007bff);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modern-section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--heading-font-color, #1a1a1a);
    letter-spacing: -1px;
}

.modern-section-description {
    font-size: 18px;
    line-height: 1.8;
    color: var(--body-font-color, #666);
    margin-bottom: 0;
}

/* Products Grid */
.modern-products-grid {
    margin-bottom: 50px;
}

.modern-product-card {
    position: relative;
    height: 100%;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.modern-product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(var(--primary-color-rgb, 0, 123, 255), 0.2);
}

.modern-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Product Image */
.modern-product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.modern-product-image-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modern-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modern-product-card:hover .modern-product-image {
    transform: scale(1.15);
}

/* Overlay */
.modern-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb, 0, 123, 255), 0.9) 0%, rgba(var(--primary-color-rgb, 0, 123, 255), 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
}

.modern-product-card:hover .modern-product-overlay {
    opacity: 1;
}

.modern-product-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modern-product-card:hover .modern-product-icon {
    transform: scale(1);
}

/* Badge */
.modern-product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-color, #007bff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    z-index: 3;
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modern-product-card:hover .modern-product-badge {
    opacity: 1;
    transform: scale(1);
}

/* Product Content */
.modern-product-content {
    padding: 30px;
    background: #ffffff;
}

.modern-product-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--heading-font-color, #1a1a1a);
    transition: color 0.3s ease;
}

.modern-product-card:hover .modern-product-title {
    color: var(--primary-color, #007bff);
}

.modern-product-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--body-font-color, #666);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-product-footer {
    display: flex;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.modern-product-link-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color, #007bff);
    transition: gap 0.3s ease;
}

.modern-product-card:hover .modern-product-link-text {
    gap: 12px;
}

.modern-product-link-text svg {
    transition: transform 0.3s ease;
}

.modern-product-card:hover .modern-product-link-text svg {
    transform: translateX(5px);
}

/* View More Button */
.modern-products-footer {
    margin-top: 50px;
}

.btn-modern-products {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: var(--primary-color, #007bff);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-modern-products::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern-products:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern-products:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 123, 255, 0.4);
}

.btn-modern-products:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.btn-modern-products:hover .btn-icon {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .modern-products-section {
        padding: 80px 0;
    }

    .modern-section-header {
        margin-bottom: 50px;
    }

    .modern-section-description {
        font-size: 16px;
    }

    .modern-product-content {
        padding: 25px;
    }

    .modern-product-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .modern-products-section {
        padding: 60px 0;
    }

    .modern-section-header {
        margin-bottom: 40px;
    }

    .modern-section-title {
        margin-bottom: 15px;
    }

    .modern-section-description {
        font-size: 15px;
    }

    .modern-product-image-wrapper {
        padding-top: 70%;
    }

    .modern-product-content {
        padding: 20px;
    }

    .modern-product-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .modern-product-description {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .modern-product-badge {
        width: 35px;
        height: 35px;
        top: 15px;
        right: 15px;
    }

    .modern-product-badge svg {
        width: 18px;
        height: 18px;
    }

    .modern-product-icon {
        width: 50px;
        height: 50px;
    }

    .modern-product-icon svg {
        width: 24px;
        height: 24px;
    }

    .btn-modern-products {
        padding: 14px 32px;
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .modern-products-section {
        padding: 50px 0;
    }

    .modern-section-badge {
        padding: 6px 16px;
        margin-bottom: 15px;
    }

    .badge-text {
        font-size: 12px;
    }

    .modern-section-title {
        margin-bottom: 12px;
    }

    .modern-section-description {
        font-size: 14px;
    }

    .modern-product-image-wrapper {
        padding-top: 65%;
    }

    .modern-product-content {
        padding: 18px;
    }

    .modern-product-title {
        font-size: 17px;
    }

    .modern-product-description {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }

    .modern-product-footer {
        padding-top: 12px;
    }

    .modern-product-link-text {
        font-size: 13px;
    }

    .btn-modern-products {
        padding: 12px 28px;
        font-size: 14px;
        gap: 10px;
    }

    .btn-icon {
        width: 20px;
        height: 20px;
    }

    .btn-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* RTL Support */
[dir="rtl"] .modern-product-badge {
    right: auto;
    left: 20px;
}

[dir="rtl"] .modern-product-card:hover .modern-product-link-text svg {
    transform: translateX(-5px);
}

[dir="rtl"] .btn-modern-products:hover .btn-icon {
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    [dir="rtl"] .modern-product-badge {
        left: 15px;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    .modern-products-section {
        background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 100%);
    }

    .modern-product-card {
        background: #2a2a2a;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .modern-product-content {
        background: #2a2a2a;
    }

    .modern-product-title {
        color: #ffffff;
    }

    .modern-product-description {
        color: rgba(255, 255, 255, 0.7);
    }

    .modern-product-footer {
        border-color: rgba(255, 255, 255, 0.1);
    }

    .modern-section-title {
        color: #ffffff;
    }

    .modern-section-description {
        color: rgba(255, 255, 255, 0.8);
    }
}

