/* =============================================================================
   FILE: wwwroot/css/browse-index.css
   PURPOSE: Styles for Browse/Index discovery page
   =============================================================================

   ALL section primitives (.sec, .sec-white, .sec-gray, .container, .sec-title,
   .sec-sub, masonry, collection carousel, skeleton shimmer) are inherited from
   the site's main stylesheet — this file ONLY adds new patterns specific to:

     1. Browse hero variant  (.browse-hero modifier)
     2. Coverflow carousel   (.cov-*)
     3. Category preview grid (.cat-prev-grid, .cat-prev-card)
     4. Dark section         (.sec-dark)

   Do NOT redefine existing tokens or layout utilities here.
   ============================================================================= */


/* =============================================================================
   1. DARK SECTION — used behind the coverflow
   ============================================================================= */

/* .sec-dark {
    background: #080808;
    color: #fff;
}

.sec-dark .sec-title {
    color: #fff;
}

.sec-dark p,
.sec-dark .sec-sub {
    color: rgba(255, 255, 255, 0.55);
} */


/* =============================================================================
   2. BROWSE HERO — modifier on top of .hero
   ============================================================================= */

/* Stat chips shown in the hero (X categories · Y images) */
.browse-hero-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.3px;
}

.browse-hero-stats span {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 5px 14px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.browse-hero-stats .stat-sep {
    background: none;
    border: none;
    padding: 0 4px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    font-weight: 300;
}

/* =============================================================================
   2. COVERFLOW SECTION — powered by Swiper.js
   ============================================================================= */

/* .sec-dark {
    background: #080808;
    color: #fff;
}
.sec-dark .sec-title { color: #fff; }
.sec-dark p,
.sec-dark .sec-sub   { color: rgba(255,255,255,0.55); } */

.cov-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.cov-head a {
    font-size: 13px;
    font-weight: 600;
    color: var(--light);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}
.cov-head a:hover { color: #fff; }

/* ── Swiper container sizing ── */
.cov-swiper {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 60px; /* room for pagination dots */
}

/* ── Each slide: portrait card ── */
.cov-swiper swiper-slide {
/*    width: 260px;          /* desktop */
    width: 30%;          /* desktop */
    /* height: 380px; */
    height: 400px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.cov-swiper swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cov-swiper swiper-slide img.img-loaded { opacity: 1; }

/* Gradient overlay on every card */
.cov-swiper .cov-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.15) 50%,
        transparent      100%
    );
    pointer-events: none;
}

/* Text info at card bottom */
.cov-swiper .cov-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 18px 16px;
}
.cov-swiper .cov-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 3px;
    letter-spacing: -0.2px;
}
.cov-swiper .cov-info p {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

/* Red top-line accent on the active (centre) slide */
.cov-swiper swiper-slide.swiper-slide-active::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--red, #e63946);
    border-radius: 14px 14px 0 0;
    z-index: 2;
}

/* ── Swiper pagination dots ── */
.cov-swiper::part(bullet) {
    background: rgba(255,255,255,0.3);
    opacity: 1;
    width: 6px; height: 6px;
}
.cov-swiper::part(bullet-active) {
    background: #fff;
    transform: scale(1.4);
}

/* ── Responsive slide widths ── */
@media (max-width: 768px) {
    .cov-swiper swiper-slide {
        /* width: 200px; */
        width: 70%;
        /* height: 300px; */
        height: 350px;
    }
}
@media (max-width: 480px) {
    .cov-swiper swiper-slide {
        width: 85%;
        /* height: 255px; */
        height: 300px;
    }
}


/* =============================================================================
   4. CATEGORIES PREVIEW GRID
   ============================================================================= */

/* Section heading row */
.cat-prev-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

/* 4-column grid — same gutter as masonry */
.cat-prev-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Individual category card — matches reference image (Image 2) */
.cat-prev-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Image container with fixed ratio */
.cat-prev-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: #e8e8e8;
}

.cat-prev-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.cat-prev-card-img img.img-loaded {
    opacity: 1;
}

.cat-prev-card:hover .cat-prev-card-img img {
    transform: scale(1.04);
}

/* Category name label below image */
.cat-prev-card-name {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark, #111);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
    line-height: 1.3;
}

.cat-prev-card:hover .cat-prev-card-name {
    color: var(--red, #e63946);
    text-decoration: underline;
}

/* "See All Categories" button row */
.cat-prev-see-all {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.btn-see-all-cats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    border: 2px solid var(--dark, #111);
    border-radius: 8px;
    background: transparent;
    color: var(--dark, #111);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.btn-see-all-cats:hover {
    background: var(--dark, #111);
    color: #fff;
}

.btn-see-all-cats svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s;
}

.btn-see-all-cats:hover svg {
    transform: translateX(3px);
}

/* ── Responsive category grid ── */

@media (max-width: 1024px) {
    .cat-prev-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .cat-prev-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cat-prev-card-name {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .cat-prev-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}