/* ══════════════════════════════════════════════════════════════════════
   Homepage-specific styles
   ══════════════════════════════════════════════════════════════════════ */

/* ── Hero 70:30 (Shopee Style) ─────────────────────────────────────── */
.hero-wrap {
    padding: 16px 0 24px;
}

.hero-grid {
        grid-template-columns: 7fr 3fr;
        gap: 16px;
        align-items: stretch;
    }

.hero-main {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #F8FAFC;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.hero-main:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.hero-main-swiper {
    width: 100%;
    aspect-ratio: 21 / 9;
}

.hero-main-swiper .swiper-slide {
    position: relative;
}

.hero-main-slide {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hero-main-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    display: flex;
    align-items: flex-end;
    border-radius: 0 0 16px 16px;
}

.hero-main-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    background: rgba(245, 199, 106, 0.92);
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.hero-main-cta:hover {
    background: #F5C76A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.hero-main-pag {
    position: absolute;
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 5;
}

.hero-main-pag .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.5);
    opacity: 1;
    transition: all 0.3s;
}

.hero-main-pag .swiper-pagination-bullet-active {
    width: 18px;
    border-radius: 3px;
    background: #F5C76A;
}

.hero-main-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    color: #374151;
}

.hero-main:hover .hero-main-arrow {
    opacity: 1;
}

.hero-main-arrow:hover {
    background: #fff;
}

.hero-main-arrow--prev { left: 10px; }
.hero-main-arrow--next { right: 10px; }

.hero-main-placeholder {
    aspect-ratio: 21 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F8FAFC;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ── Side Banners (30%) — 2 cards stacked vertically ──────────────── */
.hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}

.hero-side-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #0B2447, #19376D);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(11, 36, 71, 0.10);
}

.hero-side-card:hover {
    box-shadow: 0 6px 18px rgba(11, 36, 71, 0.18);
    transform: translateY(-2px);
}

/* Promo card (top) */
.hero-side-card--promo {
    position: relative;
    padding: 5%;
    box-sizing: border-box;
    justify-content: flex-end;
    overflow: hidden;
}

.hero-side-card--promo .hs-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    z-index: 1;
}

.hero-side-card--promo .hs-scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(11, 36, 71, 0.15) 0%, rgba(11, 36, 71, 0.75) 100%);
}

.hero-side-card--promo .hs-body {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hero-side-card--promo .hs-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #F5C76A;
    color: #0B2447;
    font-size: 9px;
    font-weight: 800;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: fit-content;
    line-height: 1.3;
}

.hero-side-card--promo .hs-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin: 6px 0 2px;
}

.hero-side-card--promo .hs-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.72);
    line-height: 1.35;
}

.hero-side-card--promo .hs-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 5px 14px;
    background: #F5C76A;
    color: #0B2447;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    width: fit-content;
    transition: background 0.2s;
    line-height: 1.3;
}

.hero-side-card--promo .hs-cta:hover {
    background: #e6b854;
}

/* Product card (bottom) */
.hero-side-card--product {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
}

.hero-side-card--product .hs-img-wrap {
    flex: 0 0 42%;
    overflow: hidden;
    position: relative;
}

.hero-side-card--product .hs-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.hero-side-card--product .hs-content {
    flex: 1;
    padding: 5%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.hero-side-card--product .hs-tag {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(245, 199, 106, 0.18);
    color: #F5C76A;
    font-size: 8px;
    font-weight: 700;
    border-radius: 3px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    width: fit-content;
    line-height: 1.3;
}

.hero-side-card--product .hs-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.hero-side-card--product .hs-features {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.hero-side-card--product .hs-feat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    color: rgba(255,255,255,0.82);
    line-height: 1.3;
}

.hero-side-card--product .hs-feat svg {
    flex-shrink: 0;
    color: #F5C76A;
}

.hero-side-card--product .hs-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    width: fit-content;
    transition: background 0.2s;
    line-height: 1.3;
}

.hero-side-card--product .hs-cta:hover {
    background: rgba(255,255,255,0.22);
}

/* Fallback promo cards (no DB banners) */
.hero-side-card--fallback {
    background: linear-gradient(135deg, #0B2447, #19376D);
    border: none;
    box-shadow: 0 2px 8px rgba(11, 36, 71, 0.12);
}

/* ── Mobile: Single Slider (<768px) ────────────────────────────────── */
.hero-mobile {
    overflow: hidden;
}

.hero-mobile-swiper {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.hero-mobile-swiper > .swiper-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.hero-mobile-swiper > .swiper-wrapper > .swiper-slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-mobile-slide {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
}

.hero-mobile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.hero-mobile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    display: flex;
    align-items: flex-end;
    border-radius: 0 0 12px 12px;
}

.hero-mobile-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: rgba(245, 199, 106, 0.92);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero-mobile-expiry {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: rgba(255,255,255,0.85);
    color: #475569;
    font-size: 9px;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1.3;
}

.hero-mobile-pag {
    position: relative;
    bottom: -10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 5;
}

.hero-mobile-pag .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #D1D5DB;
    opacity: 1;
    transition: all 0.3s;
}

.hero-mobile-pag .swiper-pagination-bullet-active {
    width: 18px;
    border-radius: 3px;
    background: #0B2447;
}

/* Mobile promo fallback card */
.hero-mobile-slide--promo {
    background: linear-gradient(135deg, #0B2447, #19376D);
}

.hero-mobile-slide--placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F8FAFC;
    color: #9CA3AF;
    font-size: 13px;
}

.hero-mobile-promo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 20px;
    height: 100%;
    gap: 6px;
}

.hero-mobile-promo__badge {
    display: inline-block;
    padding: 3px 10px;
    background: #F5C76A;
    color: #0B2447;
    font-size: 10px;
    font-weight: 800;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-mobile-promo__title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.hero-mobile-promo__btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
}

/* ── Desktop: 70:30 grid ───────────────────────────────────────────── */
@media (min-width: 768px) {
    .hero-wrap .hero-grid {
        display: grid;
        grid-template-columns: 7fr 3fr;
        gap: 16px;
        align-items: stretch;
    }

    .hero-main {
        /* Don't force height: 100% — let the swiper's aspect-ratio determine height */
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .hero-main-swiper {
        width: 100%;
        aspect-ratio: 21 / 9;
        height: auto;
    }

    .hero-main-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        display: block;
    }

    .hero-side {
        display: flex;
        flex-direction: column;
        gap: 10px;
        height: 100%;
    }

    .hero-side-card {
        flex: 1 1 0;
        aspect-ratio: auto;
        min-height: 0;
        height: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .hero-side-card--promo .hs-title {
        font-size: 15px;
    }

    .hero-side-card--promo .hs-desc {
        font-size: 12px;
    }

    .hero-side-card--product .hs-name {
        font-size: 14px;
    }

    .hero-side-card--product .hs-feat {
        font-size: 10px;
    }

    .hero-main-overlay {
        padding: 20px 24px;
    }

    .hero-main-cta {
        font-size: 13px;
        padding: 8px 18px;
    }

    .hero-main-pag .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .hero-main-pag .swiper-pagination-bullet-active {
        width: 24px;
    }

    .hero-main-arrow {
        width: 36px;
        height: 36px;
    }
}

@media (min-width: 1024px) {
    .hero-main-swiper {
        aspect-ratio: 21 / 9;
    }
}

/* ── Category Slider ───────────────────────────────────────────────── */
.cat-slider-section {
    padding: 20px 0 8px;
}

.cat-slider-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 16px;
}

.cat-slider-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cat-slider-more {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #0B2447;
    text-decoration: none;
    transition: color 0.2s;
}
.cat-slider-more:hover {
    color: #19376D;
}

.cat-slider-wrap {
    position: relative;
    overflow: hidden;
}

.cat-slider-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 16px 12px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.cat-slider-track::-webkit-scrollbar {
    display: none;
}

.cat-slider-item {
    flex: 0 0 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.cat-slider-item:hover,
.cat-slider-item:active {
    transform: scale(1.05);
}

.cat-slider-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #F9FAFB;
    border: 1.5px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cat-slider-item:hover .cat-slider-icon {
    border-color: #D6BB80;
    box-shadow: 0 2px 8px rgba(11,36,71,0.1);
}
.cat-slider-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.cat-slider-label {
    font-size: 10px;
    font-weight: 600;
    color: #4B5563;
    text-align: center;
    line-height: 1.2;
    max-width: 64px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "Semua" variant */
.cat-slider-icon--more {
    background: #F3F4F6;
    border: 1.5px dashed #D1D5DB;
}
.cat-slider-item--more:hover .cat-slider-icon--more {
    border-color: #0B2447;
    background: #EEF2FF;
}
.cat-slider-label--more {
    color: #0B2447;
}

@media (min-width: 768px) {
    .cat-slider-head {
        padding: 0;
    }
    .cat-slider-track {
        padding: 4px 0 12px;
    }
    .cat-slider-item {
        flex: 0 0 80px;
    }
    .cat-slider-icon {
        width: 56px;
        height: 56px;
    }
    .cat-slider-icon img {
        width: 40px;
        height: 40px;
    }
}
