.products-grid-modern {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0;
}

.modern-product-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
    height: 380px;
    border: 1px solid rgba(75, 99, 134, 0.1);
    display: flex;
    flex-direction: column;
}

.modern-product-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(75, 99, 134, 0.1);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    height: 200px;
    flex-shrink: 0;
}

.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 .product-image {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.product-nav {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    min-height: 18px;
}

.product-nav span {
    color: #adb5bd;
}

.product-category {
    font-size: 10px;
    color: #4B6386;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    background: rgba(75, 99, 134, 0.1);
    padding: 4px 8px;
    border-radius: 15px;
    display: inline-block;
    align-self: flex-start;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 auto 0;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.price-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.original-price {
    font-size: 14px;
    color: #e74c3c;
    text-decoration: line-through;
    font-weight: 500;
    line-height: 1.2;
    order: 1;
}

.discounted-price {
    font-size: 18px;
    color: #2ab1ad;
    font-weight: 800;
    line-height: 1.2;
    order: 2;
}

.price-badge {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.no-products-state {
    text-align: center;
    padding: 80px 20px;
}

.no-products-icon {
    font-size: 64px;
    color: #e9ecef;
    margin-bottom: 24px;
}

.no-products-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
}

.no-products-state p {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.browse-all-btn {
    background: linear-gradient(135deg, #4B6386 0%, #6c7b95 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(75, 99, 134, 0.2);
}

.browse-all-btn:hover {
    background: linear-gradient(135deg, #3a5070 0%, #5a6a82 100%);
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(75, 99, 134, 0.3);
}

.modern-pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 48px;
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.pagination-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.modern-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    align-items: center;
}

.pagination-item {
    display: flex;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background: #ffffff;
    color: #495057;
    text-decoration: none;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pagination-link:hover {
    background: #4B6386;
    border-color: #4B6386;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(75, 99, 134, 0.3);
}

.pagination-link.current {
    background: linear-gradient(135deg, #4B6386 0%, #6c7b95 100%);
    border-color: #4B6386;
    color: white;
    box-shadow: 0 4px 15px rgba(75, 99, 134, 0.3);
}

.pagination-link.prev-link,
.pagination-link.next-link {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
}

.pagination-link.prev-link:hover,
.pagination-link.next-link:hover {
    background: linear-gradient(135deg, #4B6386 0%, #6c7b95 100%);
    border-color: #4B6386;
}

.pagination-item.disabled .pagination-link {
    background: #f8f9fa;
    color: #ced4da;
    cursor: not-allowed;
    border-color: #f1f3f4;
}

.pagination-item.disabled .pagination-link:hover {
    background: #f8f9fa;
    color: #ced4da;
    transform: none;
    box-shadow: none;
    border-color: #f1f3f4;
}

.pagination-link.dots {
    background: transparent;
    border: none;
    cursor: default;
}

.pagination-info-mobile {
    display: none;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1200px) {
    .products-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .modern-product-card {
        height: 360px;
    }

    .product-image-wrapper {
        height: 200px;
    }
}

@media (max-width: 992px) {
    .modern-product-card {
        height: 340px;
    }

    .product-image-wrapper {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .products-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

    .modern-product-card {
        height: 320px;
    }

    .product-image-wrapper {
        height: 160px;
    }

    .product-content {
        padding: 10px;
    }

    .product-title {
        font-size: 14px;
        height: 38px;
    }
}

@media (max-width: 576px) {
    .products-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }

    .modern-product-card {
        height: 300px;
    }

    .product-image-wrapper {
        height: 150px;
    }

    .product-content {
        padding: 8px;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.product-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.modern-product-card {
    transform-origin: center bottom;
}

.modern-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(75, 99, 134, 0.05) 0%, rgba(108, 123, 149, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
}

.modern-product-card:hover::before {
    opacity: 0;
}

/* ── Sub-sub-category group cards ──────────────────────────── */
.subsubcat-group-card {
    border: 2px solid rgba(75, 99, 134, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%);
}

.subsubcat-group-card:hover {
    border-color: #4B6386;
    box-shadow: 0 12px 40px rgba(75, 99, 134, 0.2);
}

.group-count-badge {
    background: linear-gradient(135deg, #4B6386 0%, #6c7b95 100%);
    box-shadow: 0 4px 15px rgba(75, 99, 134, 0.35);
}

.group-folder-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(75, 99, 134, 0.85);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    backdrop-filter: blur(4px);
}

.subsubcat-group-card:hover {
    text-decoration: underline;
}

/* ── Group see-all styling ──────────────────────────── */
.group-see-all {
    font-size: 12px;
    color: #4B6386;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.5px;
}

.cat-sep {
    color: #adb5bd;
    margin: 0 4px;
    font-size: 12px;
}