/* ============================================================
   Kobizap Storefront — Editorial design layer
   Hero / Flash Sale / New Arrivals
   ============================================================ */

/* ---------- Hero ---------- */
.shop-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 4.5rem 3rem;
    color: #fff;
    background:
        radial-gradient(900px 500px at 85% -20%, rgba(122, 90, 255, .55) 0%, transparent 55%),
        radial-gradient(700px 450px at -10% 120%, rgba(20, 184, 166, .40) 0%, transparent 55%),
        linear-gradient(135deg, #1B1B3A 0%, #241B4D 60%, #2A1E56 100%);
}
.shop-hero .hero-eyebrow {
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #B8AFFF;
    font-weight: 700;
    margin-bottom: 1rem;
}
.shop-hero .hero-title {
    font-family: var(--font-display, 'Fraunces', Georgia, serif);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    max-width: 16ch;
}
.shop-hero .hero-sub {
    font-size: 1.05rem;
    color: #D6D2F2;
    max-width: 52ch;
    margin-bottom: 1.75rem;
}
.shop-hero .hero-cta {
    display: inline-flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.hero-btn-primary {
    background: #fff;
    color: #1B1B3A;
    border: none;
    font-weight: 700;
    padding: .8rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.hero-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,255,255,.25); color: #1B1B3A; }
.hero-btn-ghost {
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    font-weight: 600;
    padding: .8rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background .15s ease;
}
.hero-btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Section headers ---------- */
.shop-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 3rem 0 1.5rem;
}
.shop-section-title {
    font-family: var(--font-display, 'Fraunces', Georgia, serif);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
}
.shop-section-sub { color: var(--muted, #8A8DA8); margin: .25rem 0 0; font-size: .9rem; }

/* ---------- Flash sale countdown ---------- */
.flash-countdown {
    display: inline-flex;
    gap: .4rem;
    align-items: center;
}
.flash-countdown .cd-box {
    background: var(--ink, #1B1B3A);
    color: #fff;
    border-radius: 10px;
    padding: .45rem .55rem;
    min-width: 46px;
    text-align: center;
    font-weight: 700;
    font-size: .95rem;
    line-height: 1;
}
.flash-countdown .cd-label {
    display: block;
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .75;
    margin-top: .2rem;
    font-weight: 600;
}
.flash-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #E11D48, #FF4D6D);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .3rem .6rem;
    border-radius: 999px;
}
.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #0E9F6E, #10B981);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .3rem .6rem;
    border-radius: 999px;
}

/* ---------- Product card (storefront) ---------- */
.shop-card { position: relative; }
.shop-card .card-img-top { transition: transform .3s ease; }
.shop-card:hover .card-img-top { transform: scale(1.04); }
.shop-card .price-now { font-weight: 800; color: var(--accent, #5A4BFF); }
.shop-card .price-was { text-decoration: line-through; color: var(--muted, #8A8DA8); font-size: .85rem; margin-left: .4rem; }

/* ---------- New arrivals showcase (horizontal scroll) ---------- */
.arrivals-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 260px;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .75rem;
    scroll-snap-type: x mandatory;
}
.arrivals-scroll > * { scroll-snap-align: start; }

/* ---------- Product gallery thumbnails ---------- */
.shop-thumb { opacity: .75; transition: opacity .15s ease, border-color .15s ease; }
.shop-thumb:hover { opacity: 1; }
.shop-thumb.active { opacity: 1; border-color: var(--accent, #5A4BFF) !important; }

/* ---------- Brands strip ---------- */
.brands-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 160px;
    gap: .75rem;
    overflow-x: auto;
    padding-bottom: .75rem;
    scroll-snap-type: x mandatory;
}
.brands-strip > * { scroll-snap-align: start; }
.brand-chip {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .75rem .9rem;
    color: var(--ink);
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}
.brand-chip:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.brand-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-tint);
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- Category navigation (top) ---------- */
.category-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav-item {
    flex-shrink: 0;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    scroll-snap-align: start;
}
.category-nav-item:hover { border-color: var(--accent); color: var(--ink); }
.category-nav-item.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---------- Dark theme (toggled via <html data-theme="dark">) ---------- */
[data-theme="dark"] {
    --bg: #0F1024;
    --surface: #171936;
    --ink: #F0F1FB;
    --ink-soft: #B8BBDA;
    --muted: #8A8DA8;
    --line: #2A2D4E;
    --accent: #7C6BFF;
    --accent-strong: #9F8FFF;
    --accent-tint: #262052;
    --success: #2DD4A0;
    --success-tint: #0E2A22;
    --danger: #FF5C7A;
    --danger-tint: #2A1420;
    --warning: #F5B84C;
    --warning-tint: #2A2210;
    --info: #5B9BFF;
    --info-tint: #0F1C33;
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
[data-theme="dark"] .portal-navbar { background: rgba(15, 16, 36, .9); }
[data-theme="dark"] .card { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .table { --bs-table-hover-bg: #1E203F; }
[data-theme="dark"] .shop-hero {
    background:
        radial-gradient(900px 500px at 85% -20%, rgba(122, 90, 255, .45) 0%, transparent 55%),
        radial-gradient(700px 450px at -10% 120%, rgba(45, 212, 160, .30) 0%, transparent 55%),
        linear-gradient(135deg, #0F1024 0%, #191540 60%, #1F1850 100%);
}

/* ---------- Hero slider ---------- */
.shop-slider .carousel-item { border-radius: 24px; overflow: hidden; }
.shop-slider .slide-inner { min-height: 360px; padding: 4rem 3rem; color: #fff; }
.shop-slider .carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- Banner strip ---------- */
.shop-banner {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 1.75rem 1.5rem;
    color: #fff;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.shop-banner h5 { font-family: var(--font-display, 'Fraunces', Georgia, serif); font-size: 1.4rem; margin: 0 0 .25rem; }
.shop-banner p { margin: 0 0 1rem; opacity: .85; font-size: .9rem; }

/* ---------- Theme toggle switch ---------- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}
.theme-toggle .switch {
    position: relative;
    width: 46px;
    height: 24px;
    background: var(--ink);
    border-radius: 999px;
    transition: background .2s ease;
}
.theme-toggle .switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}
.theme-toggle input { display: none; }
.theme-toggle input:checked + .switch { background: var(--accent); }
.theme-toggle input:checked + .switch::after { transform: translateX(22px); }

/* ---- Premium product-card extras: rating stars, stock badges ---- */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    line-height: 1;
}
.star-rating .star {
    color: #cbd5e1;
    font-size: .85rem;
}
.star-rating .star.filled {
    color: #f6a700;
}
.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    color: #fff;
}
.stock-badge.out { background: #ef4444; }
.stock-badge.low { background: #f59e0b; }
.sold-out-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .45);
    color: #fff;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .8rem;
    backdrop-filter: blur(2px);
}

/* ---- Compare bar + toggle ---- */
.compare-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 999px;
    padding: .5rem 1rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
    font-size: .9rem;
}
.compare-toggle.active {
    background: var(--brand, #696cff) !important;
    color: #fff !important;
    border-color: var(--brand, #696cff) !important;
}
.compare-table th, .compare-table td { vertical-align: middle; }

/* ---- Testimonials ---- */
.testimonial-card { border-radius: 1rem; }
.testimonial-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #696cff, #9f7aea);
    color: #fff;
    font-weight: 700;
}

/* ---- Brands marquee ---- */
.brands-strip.marquee {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.brands-strip.marquee .marquee-track {
    display: flex;
    gap: .75rem;
    width: max-content;
    animation: brand-marquee 30s linear infinite;
}
.brands-strip.marquee:hover .marquee-track {
    animation-play-state: paused;
}
@keyframes brand-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
