/* SIKUMBANG - Landing / Public shared design tokens */
:root {
    --bg-0: #0b1220;
    --bg-1: #101a30;
    --bg-2: #16213d;
    --ink: #0f172a;
    --ink-soft: #475569;
    --muted: #94a3b8;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --line: #e2e8f0;
    --brand: #ff5c00;         /* warm orange - Nusantara */
    --brand-2: #ffb703;       /* gold */
    --brand-3: #06b6d4;       /* teal accent */
    --brand-dark: #d94a00;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --shadow-sm: 0 4px 12px rgba(15,23,42,.06);
    --shadow-md: 0 12px 34px rgba(15,23,42,.10);
    --radius: 14px;
    --font-hd: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
[data-bs-theme="dark"] {
    --surface: #0b1220;
    --surface-alt: #101a30;
    --ink: #f1f5f9;
    --ink-soft: #cbd5e1;
    --muted: #94a3b8;
    --line: #1f2a44;
    --shadow-sm: 0 4px 14px rgba(0,0,0,.35);
    --shadow-md: 0 20px 50px rgba(0,0,0,.5);
}

@import url('fonts.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.landing-body {
    font-family: var(--font-body);
    background: var(--surface-alt);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* --- Nav --- */
.landing-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
[data-bs-theme="dark"] .landing-nav { background: rgba(11,18,32,.85); }
.landing-nav .container-xl {
    display: flex; align-items: center; gap: 16px; padding: 14px 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; font-family: var(--font-hd); font-weight: 700; font-size: 22px;
    box-shadow: 0 8px 24px rgba(255,92,0,.35);
    overflow: hidden;
}
.brand-mark.brand-mark-img { background: #fff; padding: 4px; }
.brand-mark.brand-mark-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { font-family: var(--font-hd); font-weight: 700; font-size: 18px; line-height: 1; }
.brand-tag { color: var(--muted); font-size: 11px; margin-top: 2px; letter-spacing: .3px; }

.landing-search {
    position: relative; display: flex; align-items: center;
    background: var(--surface-alt); border: 1px solid var(--line);
    border-radius: 999px; padding: 8px 16px; min-width: 260px;
}
[data-bs-theme="dark"] .landing-search { background: var(--bg-1); }
.landing-search i { color: var(--muted); margin-right: 8px; }
.landing-search input { border: 0; background: transparent; outline: none; color: var(--ink); width: 100%; }
.search-suggest {
    position: absolute; top: 110%; left: 0; right: 0; background: var(--surface);
    border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md);
    max-height: 420px; overflow: auto; display: none; z-index: 200;
}
.search-suggest.open { display: block; }
.search-suggest .item { display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-suggest .item:hover { background: var(--surface-alt); }
.search-suggest .item img, .search-suggest .item .no-img {
    width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--surface-alt);
    display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.search-suggest .item .meta { font-size: 12px; color: var(--muted); }

.btn-icon {
    width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
    color: var(--ink);
}

/* --- Hero --- */
.hero {
    position: relative; padding: 84px 0 60px;
    background:
        radial-gradient(circle at 12% 20%, rgba(255,92,0,.14), transparent 55%),
        radial-gradient(circle at 92% 90%, rgba(6,182,212,.18), transparent 50%),
        linear-gradient(180deg, #fff, var(--surface-alt) 80%);
    overflow: hidden;
}
[data-bs-theme="dark"] .hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(255,92,0,.28), transparent 60%),
        radial-gradient(circle at 90% 90%, rgba(6,182,212,.16), transparent 50%),
        linear-gradient(180deg, #0b1220, #101a30 80%);
}
.hero h1 {
    font-family: var(--font-hd); font-weight: 700;
    font-size: clamp(38px, 5.4vw, 74px); line-height: 1.02; letter-spacing: -.02em;
    margin: 0 0 22px;
}
.hero .accent { color: var(--brand); }
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 640px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 32px; }
.hero-stats .stat .n { font-family: var(--font-hd); font-size: 34px; font-weight: 700; color: var(--brand); }
.hero-stats .stat .l { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.hero-illust {
    position: relative; aspect-ratio: 1/1; max-width: 460px; margin: 0 auto;
    border-radius: 32px; overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #ffedd5, #cffafe);
    box-shadow: var(--shadow-md);
}
.hero-illust::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background-image:
        radial-gradient(circle at 22% 30%, #ff5c00 0 22px, transparent 24px),
        radial-gradient(circle at 78% 65%, #06b6d4 0 30px, transparent 32px),
        radial-gradient(circle at 30% 78%, #ffb703 0 26px, transparent 28px);
    opacity: .85;
}
.hero-illust .flip-preview {
    position: absolute; inset: 15% 10%; background: white; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.15); z-index: 3; overflow: hidden;
    display: grid; grid-template-columns: 1fr 1fr;
}
.hero-illust .flip-preview .page {
    padding: 22px 18px; border-right: 2px dashed #f5e3c8;
    text-decoration: none; color: inherit; display: flex; flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.hero-illust .flip-preview .page:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15,23,42,.08);
}
.hero-illust .flip-preview .page:last-child { border-right: 0; }
.hero-illust .flip-preview .p-title {
    font-family: var(--font-hd); font-size: 15px; font-weight: 700; margin-top: 10px;
    color: #0f172a; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-illust .flip-preview .p-price { color: var(--brand); font-weight: 700; margin-top: auto; font-size: 14px; }
.hero-illust .flip-preview .p-thumb {
    aspect-ratio: 1/1; border-radius: 10px;
    background: linear-gradient(135deg,#fed7aa,#fb923c);
    background-size: contain;                /* proporsional, tidak crop */
    background-position: center center;
    background-repeat: no-repeat;
}
.hero-illust .flip-preview .p-cat-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
    margin-top: 8px; opacity: .85;
}
.hero-illust .flip-preview .p-umkm-mini {
    font-size: 11px; color: #64748b; margin-top: 4px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-illust .flip-preview .p-umkm-mini i { margin-right: 4px; }

/* --- Sections --- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.section-head h2 { font-family: var(--font-hd); font-weight: 700; font-size: clamp(24px, 3vw, 34px); margin: 0; }
.section-head .sub { color: var(--muted); }

/* Category chips */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.cat-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    padding: 22px 18px; text-decoration: none; color: var(--ink); position: relative; overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.cat-card .cat-icon {
    width: 50px; height: 50px; border-radius: 14px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 26px; color: white; margin-bottom: 10px;
}
.cat-card .cat-count { font-size: 12px; color: var(--muted); }
.cat-card .cat-name { font-family: var(--font-hd); font-weight: 700; font-size: 17px; }

/* Product card */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.p-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
    overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.p-card .p-thumb {
    aspect-ratio: 4/3; background: var(--surface-alt); position: relative; overflow: hidden;
}
.p-card .p-thumb img {
    width: 100%; height: 100%;
    object-fit: contain;              /* paksa contain, jaga aspect ratio */
    object-position: center center;
    display: block;
    background: var(--surface-alt);   /* background untuk area kosong */
    transition: transform .4s;
}
.p-card:hover .p-thumb img { transform: scale(1.03); }
.p-card .p-badge {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    background: #ffb703; color: #0f172a; padding: 4px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.p-card .p-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-card .p-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.p-card .p-name { font-family: var(--font-hd); font-weight: 700; font-size: 16px; line-height: 1.25; }
.p-card .p-umkm { color: var(--ink-soft); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.p-card .p-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.p-card .p-price { color: var(--brand); font-weight: 700; }

/* Search & filter bar */
.filter-bar {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    padding: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.filter-bar select, .filter-bar input { border-radius: 999px; }

/* Buttons */
.btn-brand { background: var(--brand); border: 0; color: white; }
.btn-brand:hover { background: var(--brand-dark); color: white; }
.btn.rounded-pill { padding: 8px 20px; }

/* Footer */
.landing-footer {
    background: var(--bg-0); color: #cbd5e1; padding: 60px 0 20px; margin-top: 80px;
}
.landing-footer .brand-name { color: white; }
.footer-title { color: white; font-family: var(--font-hd); font-weight: 700; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #cbd5e1; text-decoration: none; }
.footer-links a:hover { color: var(--brand-2); }
.footer-bottom { text-align: center; padding-top: 28px; margin-top: 28px; border-top: 1px solid #1e293b; color: #64748b; font-size: 13px; }

/* Errors */
.err-code { color: var(--brand); font-family: var(--font-hd); }

/* Detail page */
.product-detail .gallery img { width: 100%; border-radius: 20px; box-shadow: var(--shadow-sm); object-fit: contain; background: #f8fafc; aspect-ratio: 4/3; }
.product-detail .thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.product-detail .thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.product-detail .thumbs img.active { border-color: var(--brand); }
.product-detail .info h1 { font-family: var(--font-hd); font-weight: 700; font-size: 34px; margin: 0 0 8px; }
.product-detail .info .price { color: var(--brand); font-family: var(--font-hd); font-size: 32px; font-weight: 700; }
.umkm-card { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: var(--surface); }

/* UMKM profile hero */
.umkm-hero {
    background: linear-gradient(135deg, #fef3c7, #ffedd5, #cffafe);
    border-radius: 24px; padding: 42px; margin-top: 24px;
}
[data-bs-theme="dark"] .umkm-hero { background: linear-gradient(135deg, #1e293b, #0f172a); }

/* Empty state */
.empty {
    text-align: center; padding: 48px 24px; color: var(--muted);
}
.empty i { font-size: 42px; margin-bottom: 8px; display: block; }

/* Utilities */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    background: var(--surface-alt); color: var(--ink-soft); font-size: 12px; }

/* Loading skeleton */
.skeleton { background: linear-gradient(90deg, #eee 0, #f5f5f5 40%, #eee 80%); background-size: 200% 100%;
    animation: sk 1.4s infinite; border-radius: 8px; }
[data-bs-theme="dark"] .skeleton { background: linear-gradient(90deg,#1e293b 0,#334155 40%,#1e293b 80%); background-size:200% 100%; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
