/* =====================================================
   Kanaya Batik — Design System
   Identitas hangat & berkarakter: serif etnik untuk judul,
   motif kawung/parang sebagai tekstur, palet soga-emas-indigo,
   dan garis tipis ala kain batik — bukan template polos.
   ===================================================== */

:root {
    /* ---- Palet inti ---- */
    --ink: #17130F;              /* nyaris hitam — teks utama, tombol utama */
    --ink-soft: #322A22;         /* hover state dari ink */
    --soga: #A9673A;             /* coklat soga — aksen, harga, hover link */
    --soga-light: #C88C5E;
    --indigo: #23324A;
    --sekar: #8A2E22;
    --gold: #B3872F;             /* emas antik — highlight kecil, active state */
    --gold-soft: rgba(179, 135, 47, 0.12);
    --cream: #FAF7F1;            /* dasar halaman — hampir putih, hangat */
    --surface: #FFFFFF;
    --surface-alt: #F4F0E8;
    --line: #E9E4D8;             /* garis tipis */
    --line-strong: #DCD4C2;

    /* ---- Alias kompatibilitas ---- */
    --batik-primary: var(--ink);
    --batik-primary-dark: var(--ink-soft);
    --batik-secondary: var(--soga);
    --batik-accent: var(--soga-light);
    --batik-gold: var(--gold);
    --batik-light: var(--surface-alt);
    --batik-cream: var(--cream);
    --batik-muted: #8D8474;

    /* ---- Netral / teks ---- */
    --color-text: var(--ink);
    --color-text-muted: #83796A;
    --color-border: var(--line);
    --color-surface: var(--surface);
    --color-bg: var(--cream);

    /* ---- Bayangan — sangat halus ---- */
    --shadow-sm: 0 1px 2px rgba(23, 19, 15, 0.05);
    --shadow-md: 0 10px 24px rgba(23, 19, 15, 0.06);
    --shadow-lg: 0 24px 48px rgba(23, 19, 15, 0.10);
    --shadow-hover: var(--shadow-md);

    /* ---- Radius — kecil & tegas, bukan bulat SaaS ---- */
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 16px;
    --radius-pill: 8px;          /* pengganti pill 999px — agak ngotak, bukan lonjong penuh */

    --transition: 0.2s ease;

    /* ---- Tipografi: serif etnik untuk judul, sans bersih untuk body ---- */
    --font-display: 'Fraunces', 'Poppins', serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* ---- Motif batik (SVG, diwarnai via currentColor) ---- */
    --pattern-kawung: url('/assets/img/halaman/pattern-kawung.svg');
    --pattern-parang: url('/assets/img/halaman/pattern-parang.svg');
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 0.95rem;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Garis motif tipis — dipakai sebagai divider bernuansa batik */
.motif-rule {
    height: 10px;
    background-color: var(--gold);
    opacity: 0.55;
    -webkit-mask-image: var(--pattern-parang);
    mask-image: var(--pattern-parang);
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
    -webkit-mask-size: 20px 10px;
    mask-size: 20px 10px;
}

p { max-width: 62ch; }
a { transition: color var(--transition); color: var(--ink); }
img { max-width: 100%; height: auto; }

/* ========== Utilities ========== */
.text-batik { color: var(--ink) !important; }
.bg-batik { background: var(--ink) !important; }
.bg-cream { background-color: var(--surface-alt); }

/* ========== Navbar ========== */
.navbar-batik {
    background: var(--surface);
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 1030;
}

.navbar-batik::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--soga), var(--gold), var(--indigo));
}

.navbar-batik .navbar-brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink) !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.navbar-batik .navbar-brand .brand-mark { width: 34px; height: 34px; color: var(--soga); flex-shrink: 0; }
.navbar-batik .navbar-brand .brand-mark svg { width: 100%; height: 100%; display: block; }
.navbar-batik .navbar-brand small {
    display: block; font-family: var(--font-body); font-size: 0.6rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-text-muted); margin-top: 1px;
}

@media (min-width: 992px) {
    .navbar-batik .navbar-collapse { display: flex !important; flex-grow: 1; align-items: center; }
    .navbar-batik .nav-center { display: flex; justify-content: center; flex: 1; gap: 0.25rem; }
    .navbar-batik .nav-actions { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }

    .navbar-batik .nav-link {
        color: var(--color-text) !important;
        font-weight: 500;
        font-size: 0.875rem;
        padding: 0.5rem 1rem !important;
        transition: color var(--transition);
        position: relative;
    }

    .navbar-batik .nav-link:hover,
    .navbar-batik .nav-link.active { color: var(--ink) !important; background: transparent; }

    .navbar-batik .nav-link::after {
        content: '';
        position: absolute;
        bottom: 3px;
        left: 1rem;
        right: 1rem;
        transform: scaleX(0);
        transform-origin: center;
        height: 2px;
        background: var(--gold);
        transition: transform var(--transition);
    }

    .navbar-batik .nav-link:hover::after,
    .navbar-batik .nav-link.active::after { transform: scaleX(1); }
}

@media (max-width: 991.98px) {
    .navbar-batik .navbar-collapse {
        background: var(--surface);
        margin: 1rem -0.75rem -1rem;
        padding: 1rem;
        border-top: 1px solid var(--line);
    }
    .navbar-batik .nav-center { flex-direction: column; gap: 0.1rem; }
    .navbar-batik .nav-actions {
        flex-direction: column; align-items: stretch; gap: 0.5rem;
        margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line);
    }
    .navbar-batik .nav-link { color: var(--color-text) !important; padding: 0.65rem 0.25rem !important; }
    .navbar-batik .nav-link:hover { color: var(--soga) !important; }
    .navbar-batik .navbar-toggler .navbar-toggler-icon {
        filter: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(23,19,15,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

.navbar-batik .nav-actions .nav-link {
    font-size: 1rem;
    padding: 0.4rem 0.6rem !important;
}

.navbar-batik .btn-outline-light {
    border: 1px solid var(--ink);
    color: var(--ink) !important;
    font-weight: 500;
    padding: 0.4rem 1.1rem;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
}

.navbar-batik .btn-outline-light:hover { background: var(--ink); border-color: var(--ink); color: #fff !important; }

.navbar-batik .cart-badge {
    position: absolute; top: -4px; right: -6px;
    font-size: 0.62rem; min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
    background: var(--ink) !important; color: #fff !important;
}

.navbar-batik .dropdown-menu { border-radius: var(--radius-md); border-color: var(--line); }

/* ========== Hero ========== */
.hero-batik {
    position: relative;
    background-color: var(--ink);
    background-image: linear-gradient(120deg, rgba(23,19,15,0.88), rgba(23,19,15,0.62) 55%, rgba(23,19,15,0.82)),
        url('../img/halaman/hero-batik-bg.jpg');
    background-size: cover;
    background-position: center;
    min-height: 480px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    border-bottom: 4px solid var(--gold);
    --spot-x: 50%;
    --spot-y: 40%;
}

/* Sorotan cahaya yang mengikuti kursor — dibaca dari --spot-x/--spot-y via JS */
.hero-batik .hero-spotlight {
    position: absolute; inset: 0;
    background: radial-gradient(480px circle at var(--spot-x) var(--spot-y),
        rgba(255, 226, 176, 0.16), rgba(255, 226, 176, 0.05) 45%, transparent 70%);
    pointer-events: none;
    transition: opacity 0.4s ease;
    opacity: 0;
    z-index: 1;
}

.hero-batik:hover .hero-spotlight,
.hero-batik.spotlight-active .hero-spotlight { opacity: 1; }

@media (hover: none) {
    .hero-batik .hero-spotlight { display: none; }
}

.hero-batik .container { position: relative; z-index: 2; }

.hero-batik .eyebrow-rule {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.1rem;
}

.hero-batik .eyebrow-rule::before {
    content: '';
    width: 26px; height: 1.5px; background: var(--gold);
}
.hero-batik .eyebrow-rule::after { content: none; }

.hero-batik h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-style: italic;
    font-size: clamp(2.3rem, 4.8vw, 3.6rem);
    margin-bottom: 1.1rem;
    color: #fff;
    letter-spacing: 0;
}

.hero-batik .lead {
    font-size: 1rem;
    color: rgba(255,255,255,0.82);
    max-width: 460px;
    line-height: 1.7;
    font-family: var(--font-body);
}

.hero-batik .btn { padding: 0.75rem 1.9rem; font-weight: 600; border-radius: var(--radius-pill); transition: all var(--transition); }
.hero-batik .btn-light { background: #fff; color: var(--ink); border: 1px solid #fff; }
.hero-batik .btn-light:hover { background: transparent; color: #fff; }
.hero-batik .btn-outline-light { border: 1px solid rgba(255,255,255,0.7); color: #fff; background: transparent; }
.hero-batik .btn-outline-light:hover { background: #fff; color: var(--ink); }

/* ========== Category showcase (beranda) — ringkas, baris kecil ========== */
/* Sebelumnya kartu besar (aspect-ratio 3/3.4) berisi gradient warna + ikon FA.
   Diganti jadi baris ringkas agar tidak boros ruang; warna showcase tetap
   dipakai sebagai aksen kecil (border-left + ikon), bukan blok warna penuh. */
.category-showcase {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    border-radius: var(--radius-md);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--showcase-c1, var(--soga));
    padding: 0.7rem 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.category-showcase:hover {
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
    border-color: var(--showcase-c1, var(--soga));
}

.category-showcase .cat-icon {
    flex-shrink: 0;
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    background: linear-gradient(155deg, var(--showcase-c1, var(--soga)), var(--showcase-c2, var(--ink)));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.85rem;
}

.category-showcase .cat-thumb {
    flex-shrink: 0;
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-alt);
}
.category-showcase .cat-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.category-showcase .cat-text { min-width: 0; display: flex; flex-direction: column; }

.category-showcase .label {
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-showcase .count {
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-top: 0.1rem;
}

/* ========== Section ========== */
.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0;
    color: var(--color-text);
    margin-bottom: 0.6rem;
    padding-bottom: 0.7rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 6px;
    background-color: var(--gold);
    -webkit-mask-image: var(--pattern-parang);
    mask-image: var(--pattern-parang);
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
    -webkit-mask-size: 14px 6px;
    mask-size: 14px 6px;
}

.text-center .section-title::after { left: 50%; transform: translateX(-22px); }

.section-subtitle { color: var(--color-text-muted); font-size: 0.9rem; }

/* ========== Product Card ========== */
.product-card {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    height: 100%;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: none;
    position: relative;
}

.product-card:hover { box-shadow: var(--shadow-md); }

.product-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: var(--surface-alt);
    border-radius: var(--radius-md);
    display: block;
}

.product-card .card-img-wrapper::after { content: none; }

.product-card .card-img-top {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-card .wishlist-btn {
    position: absolute; top: 0.6rem; right: 0.6rem;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink); font-size: 0.85rem;
    transition: all var(--transition);
    z-index: 2;
}

.product-card .wishlist-btn:hover { color: var(--sekar); }

.product-card .card-body { padding: 0.85rem 0.15rem 0; }

.product-card .category-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--soga);
}

.product-card .card-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.3rem 0 0.4rem;
    line-height: 1.4;
}

.product-card .card-title a { color: var(--color-text); text-decoration: none; }
.product-card .card-title a:hover { color: var(--soga); }

.product-card .price { color: var(--soga); font-weight: 700; font-size: 0.98rem; font-family: var(--font-body); }

/* ========== Buttons ========== */
.btn-batik {
    background: var(--ink);
    border: 1px solid var(--ink);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.6rem 1.4rem;
    transition: all var(--transition);
    box-shadow: none;
}

.btn-batik:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: #fff; }
.btn-batik:active { transform: translateY(1px); }

.btn-outline-batik {
    border: 1px solid var(--ink);
    color: var(--ink);
    font-weight: 600;
    border-radius: var(--radius-pill);
    background: transparent;
    transition: all var(--transition);
}

.btn-outline-batik:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 0.4rem 0.95rem; font-size: 0.82rem; }

/* ========== Feature / Why Us Cards ========== */
.feature-card { background: transparent; border: none; padding: 0; height: 100%; text-align: left; }
.feature-card::before { content: none; }

.feature-card .icon-circle {
    width: 50px; height: 50px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; margin-bottom: 1.1rem;
    background: linear-gradient(135deg, var(--soga), var(--gold));
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.feature-card h5 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 0; }

/* ========== Stats Cards (Tentang) ========== */
.stat-box { background: transparent; border: none; padding: 0; }
.stat-box::before { content: none; }
.stat-box i {
    color: var(--soga);
    width: 56px; height: 56px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--gold-soft);
    font-size: 1.3rem !important;
}
.stat-box h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; color: var(--ink); margin: 0.5rem 0 0.25rem; }

/* ========== Footer ========== */
.footer-batik {
    background-color: var(--ink);
    background-image: linear-gradient(180deg, rgba(23,19,15,0.93), rgba(23,19,15,0.97)),
        url('../img/halaman/hero-batik-bg.jpg');
    background-size: cover;
    background-position: center;
    color: rgba(255, 255, 255, 0.72);
    margin-top: auto;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Garis gradasi khas — sama seperti navbar, penanda identitas */
.footer-batik::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--soga), var(--gold), var(--indigo));
    z-index: 1;
}

/* Motif kawung sebagai tekstur tambahan di atas foto */
.footer-batik::after {
    content: '';
    position: absolute; inset: 0;
    background-color: var(--gold);
    opacity: 0.06;
    -webkit-mask-image: var(--pattern-kawung);
    mask-image: var(--pattern-kawung);
    -webkit-mask-size: 110px;
    mask-size: 110px;
    z-index: -1;
}

.footer-batik .container { position: relative; z-index: 1; }

.footer-batik h5 { font-family: var(--font-display); font-weight: 600; font-style: italic; font-size: 1.05rem; color: #fff; margin-bottom: 1.1rem; }
.footer-batik .brand-mark { width: 28px; height: 28px; color: var(--gold); }
.footer-batik .brand-mark svg { width: 100%; height: 100%; display: block; }
.footer-batik p, .footer-batik a { color: rgba(255, 255, 255, 0.62); font-size: 0.9rem; text-decoration: none; }
.footer-batik a:hover { color: var(--gold); }
.footer-batik .list-unstyled li { margin-bottom: 0.5rem; }
.footer-batik hr { border-color: rgba(255, 255, 255, 0.12); }

/* ========== Frame foto bermotif (halaman Tentang, dll) ========== */
.about-image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: visible;
    box-shadow: var(--shadow-lg);
    padding: 10px;
    background: linear-gradient(155deg, var(--soga), var(--gold));
}
.about-image-frame img {
    display: block; width: 100%; height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 6px);
}
.about-image-frame::after {
    content: '';
    position: absolute; bottom: -18px; right: -18px;
    width: 90px; height: 90px;
    background-color: var(--gold);
    opacity: 0.5;
    -webkit-mask-image: var(--pattern-kawung);
    mask-image: var(--pattern-kawung);
    -webkit-mask-size: 45px;
    mask-size: 45px;
    z-index: -1;
}

/* ========== Panel info kontak — foto batik sebagai latar, teks terang di atas ========== */
.contact-info-panel {
    position: relative;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--shadow-lg);
    background-color: var(--ink);
    background-image: linear-gradient(165deg, rgba(23,19,15,0.90), rgba(23,19,15,0.82)),
        url('../img/halaman/kontak-batik.jpg');
    background-size: cover;
    background-position: center;
}
.contact-info-panel-inner {
    position: relative;
    z-index: 1;
    padding: 2.25rem 2rem;
    color: rgba(255, 255, 255, 0.92);
}
.contact-info-panel-inner .section-title { color: #fff; }
.contact-info-panel-inner strong { color: #fff; }
.contact-info-panel-inner i {
    color: var(--gold);
    width: 20px;
    text-align: center;
}

/* ========== Detail Produk ========== */
.detail-image-wrapper { background-color: var(--surface-alt); border-radius: var(--radius-md); }
.detail-image { max-height: 480px; object-fit: cover; }
.breadcrumb-item a { color: var(--color-text-muted); text-decoration: none; font-size: 0.85rem; }
.breadcrumb-item a:hover { color: var(--ink); }
.breadcrumb-item.active { color: var(--ink); font-weight: 500; font-size: 0.85rem; }

/* ========== Forms ========== */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--color-border);
    padding: 0.6rem 0.9rem;
    background-color: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 0.15rem var(--gold-soft); }

/* ========== Cards generic ========== */
.card { border-radius: var(--radius-lg); border-color: var(--color-border); }
.card.shadow, .card.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.card-header.bg-batik { border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; }

/* ========== List group (kategori) ========== */
.list-group-item.active { background-color: var(--ink); border-color: var(--ink); }
.list-group-item-action:hover { background-color: var(--surface-alt); color: var(--ink); }

/* ========== Auth pages ========== */
.auth-wrapper {
    min-height: calc(100vh - 200px);
    display: flex; align-items: center; justify-content: center;
    padding: 2.5rem 1rem; width: 100%;
    position: relative;
    background-color: var(--indigo);
    background-image: linear-gradient(160deg, rgba(15,17,26,0.88), rgba(23,32,49,0.82)),
        url('../img/halaman/auth-batik-bg.jpg');
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.auth-wrapper > .row { width: 100%; margin-left: 0; margin-right: 0; }

.auth-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden; width: 100%;
    background: var(--color-surface);
}

.auth-card .card-body { padding: 2rem 1.75rem; }
@media (min-width: 768px) { .auth-card .card-body { padding: 2.5rem; } }

/* Aksen motif tipis di atas kartu supaya identitas Kanaya Batik tetap terasa
   walau kartunya sendiri putih bersih */
.auth-card .card-motif {
    height: 6px;
    background: linear-gradient(90deg, var(--soga), var(--gold), var(--indigo));
}

.auth-brand-mark {
    width: 56px; height: 56px; color: var(--soga);
}
.auth-brand-mark svg { width: 100%; height: 100%; display: block; }

/* ========== Alert ========== */
.alert-batik { background: var(--surface-alt); border: none; border-left: 3px solid var(--ink); color: var(--ink-soft); border-radius: var(--radius-md); }

/* ========== Badge status ========== */
.badge-pending { background: var(--gold); color: #000; }
.badge-dibayar { background: var(--indigo); color: #fff; }
.badge-diproses { background: #2E6FA7; color: #fff; }
.badge-dikirim { background: var(--soga); color: #fff; }
.badge-selesai { background: #3E6B4A; color: #fff; }
.badge-dibatalkan { background: var(--sekar); color: #fff; }

/* ========== Table ========== */
.table thead { background: var(--ink); color: white; }
.table-hover tbody tr:hover { background-color: var(--surface-alt); }

.img-preview { max-width: 150px; max-height: 150px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-border); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-batik { min-height: 400px; text-align: center; }
    .hero-batik .lead { margin-left: auto; margin-right: auto; }
    .hero-batik .btn { display: block; width: 100%; max-width: 280px; margin-left: auto; margin-right: auto; }
    .hero-batik .btn + .btn { margin-top: 0.75rem; }
    .feature-card { text-align: center; }
    .feature-card .icon-circle { margin-left: auto; margin-right: auto; }
}

@media (max-width: 576px) {
    .hero-batik h1 { font-size: 1.85rem; }
    .navbar-batik .navbar-brand span { font-size: 1.05rem; }
    .section-title { font-size: 1.3rem; }
    .auth-card .card-body { padding: 1.5rem 1.25rem; }
}

/* ========== Mobile category chips (produk.php) ========== */
.category-scroll { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.category-scroll::-webkit-scrollbar { height: 5px; }
.category-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 10px; }

.category-chip {
    flex: 0 0 auto; white-space: nowrap; padding: 0.5rem 1.1rem; border-radius: var(--radius-pill);
    border: 1px solid var(--color-border); color: var(--color-text); background: var(--color-surface);
    font-size: 0.82rem; font-weight: 500; text-decoration: none; transition: all var(--transition);
}

.category-chip:hover { border-color: var(--ink); color: var(--ink); }
.category-chip.active { background: var(--soga); border-color: var(--soga); color: #fff; }

/* ========== Filter sidebar (halaman Produk/Pattern) ========== */
.filter-sidebar { background: var(--surface); }

.filter-block { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.filter-block:first-child { padding-top: 0; }

.filter-block .filter-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.9rem;
}

.color-swatches { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.color-swatch {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--line-strong);
    cursor: pointer; padding: 0; display: inline-block;
    transition: box-shadow var(--transition);
}

.color-swatch:hover, .color-swatch.active { box-shadow: 0 0 0 2px var(--ink); }

.filter-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.filter-tag {
    padding: 0.4rem 0.9rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
    font-size: 0.8rem; font-weight: 500; color: var(--color-text); background: var(--surface);
    cursor: pointer; text-decoration: none; display: inline-block; transition: all var(--transition);
}

.filter-tag:hover { border-color: var(--ink); color: var(--ink); }
.filter-tag.active { background: var(--soga); border-color: var(--soga); color: #fff; }

.price-range-track {
    position: relative; height: 3px; background: var(--line-strong); border-radius: 3px; margin: 1.5rem 0.4rem 0.75rem;
}

.price-range-track .fill { position: absolute; left: 12%; right: 18%; top: 0; bottom: 0; background: var(--ink); border-radius: 3px; }
.price-range-track .handle {
    position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 2px solid var(--ink); transform: translate(-50%, -50%);
}
.price-range-track .handle.start { left: 12%; }
.price-range-track .handle.end { left: 82%; }

.price-range-labels { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--color-text-muted); }

/* Toolbar produk (sort/hitung) */
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.catalog-toolbar .form-select { width: auto; border: none; font-size: 0.85rem; font-weight: 500; padding-right: 2rem; background-color: transparent; }

/* ========== Focus ========== */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ========== Scrollbar — selaras identitas, bukan default browser ========== */
html { scrollbar-width: thin; scrollbar-color: var(--soga-light) var(--surface-alt); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-alt); }
::-webkit-scrollbar-thumb {
    background: var(--soga-light);
    border-radius: var(--radius-pill);
    border: 2px solid var(--surface-alt);
}
::-webkit-scrollbar-thumb:hover { background: var(--soga); }

/* =====================================================
   Panel Admin & Pembeli — Dashboard / Akun
   ===================================================== */

.panel-topbar { background: var(--surface); padding: 0.9rem 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1040; }
.panel-topbar .navbar-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; color: var(--ink) !important; display: flex; align-items: center; gap: 0.5rem; }
.panel-topbar .navbar-brand i { color: var(--ink); }
.panel-topbar .navbar-brand .brand-mark { width: 26px; height: 26px; color: var(--soga); flex-shrink: 0; }
.panel-topbar .navbar-brand .brand-mark svg { width: 100%; height: 100%; display: block; }

.offcanvas-brand-mark {
    display: inline-flex; width: 22px; height: 22px;
    color: var(--soga); vertical-align: -4px; margin-right: 0.5rem;
}
.offcanvas-brand-mark svg { width: 100%; height: 100%; display: block; }
.panel-topbar .user-info { color: var(--color-text); font-size: 0.88rem; font-weight: 500; }

.panel-topbar .btn-outline-light {
    border: 1px solid var(--ink); color: var(--ink) !important; font-weight: 500;
    padding: 0.35rem 0.9rem; border-radius: var(--radius-pill); transition: all var(--transition);
}
.panel-topbar .btn-outline-light:hover { background: var(--ink); border-color: var(--ink); color: #fff !important; }

.panel-topbar .btn-menu-toggle {
    background: var(--surface-alt); border: 1px solid var(--line); color: var(--ink);
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: none; align-items: center; justify-content: center;
}
.panel-topbar .btn-menu-toggle:hover { background: var(--line); }

/* Sidebar panel — akun/dashboard */
.panel-sidebar {
    background: var(--surface);
    min-height: calc(100vh - 68px);
    width: 250px; flex-shrink: 0;
    display: flex; flex-direction: column;
    border-right: 1px solid var(--line);
}

.panel-sidebar .sidebar-header { padding: 1.5rem 1.4rem 0.75rem; }
.panel-sidebar .sidebar-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 0.5rem; }

.panel-sidebar .nav { padding: 0 0.9rem 1.5rem; flex: 1; }
.panel-sidebar .nav-link {
    display: flex; align-items: center; gap: 0.75rem; color: var(--color-text);
    border-radius: var(--radius-sm); padding: 0.7rem 1rem; margin-bottom: 0.15rem;
    font-size: 0.9rem; font-weight: 500; transition: all var(--transition); text-decoration: none;
}
.panel-sidebar .nav-link i { width: 20px; text-align: center; font-size: 0.95rem; opacity: 0.8; }
.panel-sidebar .nav-link:hover { background: var(--surface-alt); color: var(--ink); }
.panel-sidebar .nav-link.active { background: var(--ink); color: #fff; }
.panel-sidebar .nav-link.active i { color: #fff; opacity: 1; }
.panel-sidebar .sidebar-divider { border-color: var(--line); margin: 0.75rem 1rem; }
.panel-sidebar .sidebar-footer { padding: 1rem 1.4rem; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--color-text-muted); }

/* Content area */
.panel-content { background: var(--surface); min-height: calc(100vh - 68px); flex: 1; padding: 2rem; }
.panel-page-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; text-transform: uppercase; color: var(--color-text); margin-bottom: 0.25rem; }
.panel-page-subtitle { color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 1.5rem; }

/* Stat cards panel */
.panel-stat-card { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.25rem 1.35rem; height: 100%; transition: all var(--transition); box-shadow: none; }
.panel-stat-card:hover { box-shadow: var(--shadow-sm); }
.panel-stat-card .icon-box { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.panel-stat-card .stat-label { font-size: 0.78rem; color: var(--color-text-muted); font-weight: 500; margin-bottom: 0.15rem; }
.panel-stat-card .stat-value { font-size: 1.4rem; font-weight: 700; color: var(--color-text); line-height: 1.2; }

/* Varian warna icon-box — palet Kanaya, pengganti bg-primary/success/info/warning bawaan Bootstrap */
.icon-box-soga   { background: rgba(169, 103, 58, 0.12); color: var(--soga); }
.icon-box-gold   { background: var(--gold-soft); color: var(--gold); }
.icon-box-indigo { background: rgba(35, 50, 74, 0.1); color: var(--indigo); }
.icon-box-sekar  { background: rgba(138, 46, 34, 0.1); color: var(--sekar); }

/* Panel card */
.panel-card { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: none; overflow: hidden; }
.panel-card .panel-card-header { background: var(--surface); border-bottom: 1px solid var(--color-border); padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel-card .panel-card-header h5 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; margin: 0; color: var(--color-text); }
.panel-card .panel-card-body { padding: 1.25rem; }
.panel-card .panel-card-body.p-0 { padding: 0; }

/* Profil ringkas (My Size style) */
.profile-summary { text-align: center; padding: 1.5rem 1rem; }
.profile-avatar {
    width: 96px; height: 96px; border-radius: 50%;
    background: var(--surface-alt); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--ink);
    margin: 0 auto 1rem; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-summary .profile-name { font-weight: 700; margin-bottom: 0.15rem; }
.profile-summary .profile-email { font-size: 0.82rem; color: var(--color-text-muted); }

/* Table panel */
.panel-table { margin-bottom: 0; }
.panel-table thead th { background: var(--ink) !important; color: #fff !important; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; border: none; padding: 0.85rem 1rem; white-space: nowrap; }
.panel-table tbody td { padding: 0.85rem 1rem; vertical-align: middle; border-color: var(--color-border); font-size: 0.88rem; }
.panel-table tbody tr:hover { background-color: var(--surface-alt); }

.badge { font-weight: 600; font-size: 0.73rem; padding: 0.35em 0.65em; border-radius: var(--radius-sm); }

/* Offcanvas sidebar mobile */
.panel-offcanvas { width: 280px !important; background: var(--surface); }
.panel-offcanvas .offcanvas-header { border-bottom: 1px solid var(--line); }
.panel-offcanvas .offcanvas-title { color: var(--ink); font-family: var(--font-display); font-weight: 700; }

.panel-layout { display: flex; min-height: calc(100vh - 68px); }

.panel-empty { text-align: center; padding: 3rem 1.5rem; color: var(--color-text-muted); }
.panel-empty i { font-size: 2.5rem; opacity: 0.3; margin-bottom: 1rem; color: var(--ink); }

@media (max-width: 991.98px) {
    .panel-sidebar { display: none; }
    .panel-topbar .btn-menu-toggle { display: flex; }
    .panel-content { padding: 1.25rem; }
    .panel-stat-card .stat-value { font-size: 1.2rem; }
}

@media (max-width: 575.98px) {
    .panel-content { padding: 1rem; }
    .panel-page-title { font-size: 1.15rem; }
    .panel-table td, .panel-table th { padding: 0.65rem 0.75rem; font-size: 0.83rem; }
    .panel-card-header { padding: 0.85rem 1rem; flex-wrap: wrap; }
    .panel-card-body { padding: 1rem; }
}

@media (hover: none) and (pointer: coarse) {
    .btn-sm { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; }
    .panel-sidebar .nav-link, .offcanvas .nav-link { min-height: 44px; }
    .qty-btn { min-width: 40px; }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .panel-content { padding: 1.5rem; }
    .hero-batik { min-height: 420px; }
}

/* =====================================================
   Fase 1–3 Enhancements — UI/UX Design Director
   ===================================================== */

/* Profile Avatar Upload */
.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--surface-alt);
    border: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--ink);
    overflow: hidden;
    margin: 0 auto;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    border: 2px solid var(--surface);
    transition: all var(--transition);
    margin: 0;
}

.avatar-upload-btn:hover {
    background: var(--soga);
    transform: scale(1.08);
}

/* Quantity Stepper */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface);
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.qty-btn:hover:not(:disabled) {
    background: var(--surface-alt);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-input {
    width: 48px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    background: transparent;
    color: var(--ink);
}

.qty-input:focus {
    outline: none;
}

/* Sticky mobile CTA for detail product */
.sticky-cta-mobile {
    display: none;
}

@media (max-width: 767.98px) {
    .sticky-cta-mobile {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--line);
        padding: 0.75rem 1rem;
        gap: 0.75rem;
        z-index: 1050;
        box-shadow: 0 -4px 20px rgba(23, 19, 15, 0.08);
    }

    .sticky-cta-mobile .btn {
        flex: 1;
        min-height: 48px;
    }

    body {
        padding-bottom: 72px;
    }
}

/* Empty state improvements */
.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
}

.empty-state .empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--soga);
}

.empty-state h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--color-text-muted);
    max-width: 320px;
    margin: 0 auto 1.5rem;
}

/* Toast-like alert polish */
.alert {
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.alert-success {
    background: #EDF7F1;
    border-color: #C6E6D3;
    color: #2F6B4F;
}

.alert-danger {
    background: #FDF0EE;
    border-color: #F0C9C3;
    color: #8A2E22;
}

/* Button loading */
.btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Product card quick feedback */
.product-card .quick-add {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 3;
    white-space: nowrap;
}

.product-card:hover .quick-add {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Detail product improvements */
.detail-image-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-alt);
}

.detail-image {
    transition: transform 0.4s ease;
}

.detail-image-wrapper:hover .detail-image {
    transform: scale(1.03);
}

.detail-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--soga);
    font-family: var(--font-display);
}

.detail-stock {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.detail-stock.in-stock {
    color: #2F6B4F;
}

.detail-stock.out-of-stock {
    color: var(--sekar);
}

/* Form focus polish */
.form-control:focus,
.form-select:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 0.18rem var(--gold-soft);
}

/* Bottom navigation for mobile pembeli (Phase 3) */
.bottom-nav-pembeli {
    display: none;
}

@media (max-width: 767.98px) {
    .bottom-nav-pembeli {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--line);
        z-index: 1040;
        padding: 0.35rem 0;
        box-shadow: 0 -2px 12px rgba(23, 19, 15, 0.06);
    }

    .bottom-nav-pembeli a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        padding: 0.4rem 0.25rem;
        font-size: 0.68rem;
        font-weight: 500;
        color: var(--color-text-muted);
        text-decoration: none;
        transition: color var(--transition);
        min-height: 52px;
    }

    .bottom-nav-pembeli a i {
        font-size: 1.15rem;
    }

    .bottom-nav-pembeli a.active,
    .bottom-nav-pembeli a:hover {
        color: var(--ink);
    }

    /* Adjust body padding when bottom nav is present */
    body.has-bottom-nav {
        padding-bottom: 64px;
    }
}

/* =========================================================
   Panel sidebar — interaktif (admin & pembeli)
   ========================================================= */
.panel-sidebar,
.panel-offcanvas .offcanvas-body {
  background: #faf8f5;
}

.panel-nav {
  gap: 0.15rem;
  padding: 0 0.75rem 1rem;
}

.panel-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  color: #4a4238 !important;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
  text-decoration: none;
}

.panel-nav .nav-link i {
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
  font-size: 0.95rem;
}

.panel-nav .nav-link:hover {
  background: rgba(179, 135, 47, 0.12);
  color: #8a5a1a !important;
  transform: translateX(2px);
}

.panel-nav .nav-link.active {
  background: linear-gradient(135deg, #b3872f 0%, #9a7226 100%);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(179, 135, 47, 0.35);
}

.panel-nav .nav-link.active i {
  opacity: 1;
}

.panel-nav .nav-link.text-danger-hover:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #c82333 !important;
}

.sidebar-divider {
  margin: 0.85rem 1rem;
  border-color: rgba(0, 0, 0, 0.08);
  opacity: 1;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  color: #9a9080;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* =========================================================
   Tabel panel — cegah melebar di mobile
   ========================================================= */
.panel-content {
  max-width: 100%;
  overflow-x: hidden;
}

.panel-table-wrap,
.panel-card .table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.panel-table {
  margin-bottom: 0;
  min-width: 560px; /* biar scroll di dalam wrapper, bukan page */
}

.panel-table th,
.panel-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.panel-table td:first-child,
.panel-table th:first-child {
  white-space: normal;
  min-width: 120px;
}

/* Tombol aksi rapat */
.panel-table .btn-group-sm > .btn {
  padding: 0.25rem 0.45rem;
}

/* Layout panel: pastikan tidak overflow */
.panel-layout {
  display: flex;
  min-height: calc(100vh - 56px);
  max-width: 100vw;
  overflow-x: hidden;
}

.panel-sidebar {
  width: 260px;
  flex-shrink: 0;
  min-height: calc(100vh - 56px);
}

.panel-content {
  flex: 1;
  min-width: 0; /* kritis agar flex child tidak memaksa page melebar */
  padding: 1.25rem 1rem 2rem;
}

@media (min-width: 992px) {
  .panel-content {
    padding: 1.5rem 1.75rem 2.5rem;
  }
}

/* Offcanvas body flex agar footer sidebar di bawah */
.panel-offcanvas .offcanvas-body {
  display: flex;
  flex-direction: column;
}

.panel-offcanvas .panel-nav {
  flex: 1;
}

/* Sidebar section label */
.sidebar-header {
  padding: 1.25rem 1.25rem 0.35rem;
}
.sidebar-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a5a1a;
  background: rgba(179, 135, 47, 0.12);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.35rem;
}


