/* ============================================
   EXPLORE CATEGORY PAGE STYLES
   Light theme matching the explore index page
   ============================================ */

/* --- Category Hero Banner (full viewport width, outside padded container) --- */
.category-hero-banner {
    position: relative;
    width: 100%;
    min-height: 220px;
    margin-bottom: 40px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--explore-accent);
    overflow: hidden;
}

/* --- Category Page Layout --- */
.explore-category-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0 80px;
    min-height: calc(100vh - 80px);
}


.category-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    pointer-events: none;
}

.category-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 220px;
    padding: 28px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.category-back-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Work Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.25s ease;
}

.category-back-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.category-back-btn i {
    font-size: 18px;
}

.category-hero-text {
    flex: 1;
    text-align: right;
}

.category-hero-title {
    font-family: 'Merriweather', serif;
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.category-hero-description {
    font-family: 'Work Sans', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 6px 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.category-hero-count {
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   PRODUCT GRID
   ============================================ */

.category-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    justify-items: center;
}

/* --- Product Card --- */
.category-product-card {
    display: block;
    width: 100%;
    max-width: 224px;
    margin: 0;
    text-decoration: none;
    color: inherit;
    background: var(--explore-card-bg);
    border-radius: var(--explore-card-radius);
    box-shadow: var(--explore-card-shadow);
    overflow: hidden;
    transition: var(--explore-transition);
    cursor: pointer;
}

.category-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --- Card Image Area --- */
.category-product-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    overflow: hidden;
}

.category-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

/* Lazy loading styles moved to lazy-loading.css */

.category-product-card:hover .category-product-image img {
    transform: scale(1.05);
}

/* Wishlist button - reuse styles from explore_list.css */
.category-product-image .wishlist-btn {
    opacity: 0;
}

.category-product-card:hover .wishlist-btn {
    opacity: 1;
}

/* --- Card Content --- */
.category-product-content {
    padding: 14px;
    text-align: left;
}

.category-product-title {
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--explore-text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

.category-product-price {
    font-family: 'Work Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--explore-accent);
    margin: 0 0 6px 0;
}

.category-product-brand {
    font-family: 'Work Sans', sans-serif;
    font-size: 12px;
    color: var(--explore-text-muted);
}

/* ============================================
   NO PRODUCTS STATE
   ============================================ */

.no-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--explore-card-radius);
}

.no-products-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-products-message p {
    font-family: 'Work Sans', sans-serif;
    font-size: 16px;
    color: var(--explore-text-secondary);
    margin: 0 0 20px 0;
}

.back-to-explore-btn {
    display: inline-block;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: white;
    background: var(--explore-accent);
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--explore-transition);
}

.back-to-explore-btn:hover {
    background: #D4A85F;
}

/* ============================================
   PAGINATION
   ============================================ */

.category-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--explore-divider);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--explore-accent);
    background: var(--explore-card-bg);
    border: 1px solid var(--explore-divider);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--explore-transition);
}

.pagination-btn:hover {
    background: var(--explore-accent);
    color: white;
    border-color: var(--explore-accent);
}

.pagination-btn i {
    font-size: 12px;
}

.pagination-info {
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    color: var(--explore-text-muted);
}

/* ============================================
   RESPONSIVE - TABLET & MOBILE (≤1024px)
   ================0======================== */

@media (max-width: 1024px) {
    .explore-category-page {
        padding: 0 16px 48px;
    }

    .category-hero-banner {
        margin-bottom: 28px;
        min-height: 180px;
    }

    .category-hero-content {
        flex-direction: column;
        align-items: stretch;
        min-height: 180px;
        padding: 20px 16px;
    }

    .category-back-btn {
        align-self: flex-start;
        font-size: 15px;
        padding: 12px 20px;
    }

    .category-hero-text {
        text-align: left;
    }

    .category-hero-title {
        font-size: 26px;
    }

    .category-hero-description {
        font-size: 14px;
    }

    .category-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 16px;
    }

    .category-product-card {
        max-width: 100%;
    }

    .category-product-content {
        padding: 10px;
    }

    .category-product-title {
        font-size: 13px;
        min-height: 36px;
    }

    .category-product-price {
        font-size: 14px;
    }

    /* Always show wishlist button on mobile/tablet */
    .category-product-image .wishlist-btn {
        opacity: 1;
    }

    .category-pagination {
        flex-wrap: wrap;
        gap: 12px;
    }

    .pagination-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE
   ============================================ */

@media (max-width: 480px) {
    .category-hero-content {
        padding: 16px;
    }

    .category-hero-title {
        font-size: 22px;
    }

    .category-back-btn {
        font-size: 14px;
        padding: 10px 18px;
    }

    .category-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 16px;
    }

    .category-product-content {
        padding: 8px;
    }

    .category-product-title {
        font-size: 12px;
        min-height: 32px;
    }

    .category-product-price {
        font-size: 13px;
    }
}
