* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --orange: #ee4d2d; --orange2: #ff7337; --orange-dark: #d73211; --gold: #f5a623; --bg: #f5f5f5; --surface: #fff; --text: #222; --muted: #5f5f5f; --line: #e8e8e8; --green: #00b578; --amber-text: #8a5200; }
body { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid #ddd; border-radius: 6px; width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 12px; }

/* Header ala marketplace */
.topbar { background: var(--orange); color: #fff; position: sticky; top: 0; z-index: 50; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }
.logo span { color: #ffe08a; }
.search { flex: 1; display: flex; min-width: 200px; }
.search input { border-radius: 4px 0 0 4px; border: none; min-height: 40px; }
.search button { background: #fff; color: var(--orange); border: none; border-radius: 0 4px 4px 0; padding: 0 16px; font-weight: 700; min-height: 40px; }
.hbtn { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; padding: 7px 8px; font-size: 13px; position: relative; min-height: 40px; min-width: 40px; justify-content: center; display: inline-flex; align-items: center; gap: 4px; }
.hbtn .badge { position: absolute; top: -7px; right: -7px; background: #fff; color: var(--orange); border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 6px; }
.navlinks { display: flex; gap: 14px; font-size: 13px; padding: 6px 12px 10px; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; }
.navlinks a { opacity: .95; }

/* Banner */
.banner { margin: 12px 0; border-radius: 10px; overflow: hidden; position: relative; background: var(--orange); color: #fff; padding: 28px 24px; min-height: 150px; }
.banner h2 { font-size: 28px; }
.banner p { opacity: .95; margin-top: 6px; }
.banner .dots { position: absolute; bottom: 10px; left: 24px; display: flex; gap: 6px; }
.banner .dots i { width: 22px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.5); display: block; }
.banner .dots i.on { background: #fff; }
.banner .arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.25); color: #fff; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.banner .arrow.l { left: 8px; } .banner .arrow.r { right: 8px; }

/* Grid produk */
.section { background: #fff; border-radius: 8px; padding: 14px; margin: 12px 0; }
.section h3 { font-size: 17px; margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; position: relative; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee; display: block; }
.card-body { padding: 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font-size: 13px; line-height: 1.35; height: 35px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.price { color: var(--orange); font-weight: 700; font-size: 15px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 12px; }
.meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.tag { position: absolute; top: 8px; left: 0; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 0 4px 4px 0; z-index: 2; }
.tag.sultan { background: #8a6d1b; }
.tag.flash { background: #d0011b; }
.wish { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(255,255,255,.9); border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 15px; display: flex; align-items: center; justify-content: center; color: var(--orange); }
.btn { display: inline-block; background: var(--orange); color: #fff; border: none; border-radius: 6px; padding: 10px 14px; font-weight: 700; min-height: 40px; }
.btn.ghost { background: #fff; color: var(--orange); border: 1px solid var(--orange); }
.btn.green { background: var(--green); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 10px; font-size: 13px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.card-link { display: block; }

/* Galeri */
.gallery img.main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #eee; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; background: #eee; }
.thumbs img.on { border-color: var(--orange); }

/* Tabel / kartu pesanan */
.btn.ghost.selected { border-color: var(--orange); color: var(--orange); background: #fff3e0; }
.order-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; background: #fff; }
.order-store { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0 8px; }
.order-store-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); min-width: 0; }
.order-store-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #eee; flex-shrink: 0; }
.order-store-link b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-badge { font-size: 10px; font-weight: 700; color: #8a5200; background: #fff8e1; border: 1px solid #ffe082; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.order-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid #f5f5f5; text-decoration: none; color: var(--text); align-items: flex-start; }
.order-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: #eee; flex-shrink: 0; }
.order-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.order-item-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.35; }
.order-item-qty { font-size: 12px; color: var(--muted); }
.order-item-price { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; }
.order-item-price .price-old { display: block; font-size: 11px; }
.order-ship-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.order-pay-note { font-size: 12px; background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px; padding: 8px 10px; margin: 8px 0 0; }
.order-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 6px; padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 8px; font-size: 13px; color: var(--muted); }
.order-total b { color: var(--orange); font-size: 16px; }
.order-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.order-detail { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
.status { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 12px; font-weight: 700; background: #fff3e0; color: var(--amber-text); }
.status.Sampai, .status.Selesai { background: #e6f7ef; color: #007a4d; }
.status.Dibatalkan, .status.Retur { background: #fdecea; color: #c62828; }
.timeline { display: flex; gap: 0; margin: 10px 0; }
.timeline div { flex: 1; text-align: center; font-size: 12px; padding-top: 8px; border-top: 3px solid #ddd; color: var(--muted); }
.timeline div.done { border-color: var(--green); color: var(--text); font-weight: 700; }

/* Footer */
footer { background: #fff; border-top: 1px solid var(--line); margin-top: 24px; padding: 24px 12px 40px; }
footer .cols { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 800px) { footer .cols { grid-template-columns: repeat(4, 1fr); } }
footer h4 { margin-bottom: 8px; font-size: 14px; }
footer a, footer p { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.notif { position: absolute; right: 0; top: 42px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 8px; width: 320px; max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 10px; z-index: 60; }
.notif div { padding: 8px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.pill { background: #fff3e0; color: var(--amber-text); border-radius: 12px; padding: 2px 8px; font-size: 11px; font-weight: 700; }

/* ---- Kerapian (tambahan Cloudflare): grid/kartu/header seragam, tanpa tumpang tindih ---- */
.card { height: 100%; }
.card > div:last-child { margin-top: auto; }
.card-body { justify-content: flex-start; }
.card-body .price { margin-top: auto; }
.grid { align-items: stretch; }
.grid .card { min-width: 0; }

/* Detail produk: 1 kolom di HP, 2 kolom rapi (galeri | info) di desktop */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 800px) { .detail-grid { grid-template-columns: 420px 1fr; } }
.detail-grid h1 { line-height: 1.3; }

/* Tabel admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.admin-table th { background: #fafafa; font-size: 12px; color: #757575; }

/* Header rapi di HP: search turun ke baris sendiri, tombol tidak bertumpuk */
@media (max-width: 640px) {
  .topbar-inner { gap: 8px; }
  .logo { font-size: 20px; }
  .banner h2 { font-size: 19px; line-height: 1.25; }
  .banner { padding: 20px 16px; min-height: 130px; }
}

/* Tipografi & jarak konsisten */
.file-input-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.order-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #f5f5f5; text-decoration: none; color: var(--text); font-size: 13px; }
.order-mini:first-of-type { border-top: none; }
.order-mini b { margin-left: auto; white-space: nowrap; }
.order-mini .muted { white-space: nowrap; }
.section h3 { line-height: 1.4; }
.section h4 { font-size: 15px; margin-bottom: 8px; }
.section p { line-height: 1.6; }
label { font-size: 13px; color: #555; display: block; }
input[type="radio"], input[type="checkbox"] { width: auto; }

/* ---- Perbaikan kerapian dari cek visual headless ---- */
/* Panah banner tidak menimpa teks */
.banner h2, .banner p { padding: 0 34px; }
/* Blok harga tinggi tetap: harga + baris diskon selalu 2 baris supaya kartu sejajar */
.price-block { min-height: 46px; }
.price-block .row { min-height: 18px; }

/* ---- Upgrade v2 (skill: web-design-guidelines, ui-ux-polish, e-commerce) ----
   Hover/focus terlihat, transisi hanya transform/opacity/box-shadow (150-200ms
   ease-out), hormati prefers-reduced-motion, target sentuh memadai, form
   berlabel, dropdown/toast/modal aksesibel. */

/* Fokus terlihat + sentuhan responsif */
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
.price { font-variant-numeric: tabular-nums; }

/* Hover & mikro-interaksi (transform/opacity/box-shadow saja) */
.card { transition-property: transform, box-shadow; transition-duration: 200ms; transition-timing-function: ease-out; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.10); }
.btn { transition-property: background-color, transform, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(238,77,45,.25); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost:hover { background: #fff5f2; }
.hbtn { transition-property: background-color, transform; transition-duration: 150ms; transition-timing-function: ease-out; }
.hbtn:hover { background: rgba(255,255,255,.28); }
.banner .arrow { transition-property: background-color, transform; transition-duration: 150ms; transition-timing-function: ease-out; }
.banner .arrow:hover { background: rgba(0,0,0,.45); }
.wish { transition-property: transform, background-color; transition-duration: 150ms; transition-timing-function: ease-out; }
.wish:hover { transform: scale(1.12); }
.thumbs img { transition-property: border-color, transform; transition-duration: 150ms; transition-timing-function: ease-out; }
.thumbs img:hover { transform: scale(1.04); }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(238,77,45,.15); outline: none; }

/* Banner bergambar (teks kiri, foto produk kanan) */
.banner { display: flex; align-items: center; gap: 16px; }
.banner-text { flex: 1; min-width: 0; }
.banner .dots { position: static; margin-top: 12px; }
.banner-img { width: 200px; max-height: 130px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
@media (max-width: 640px) { .banner-img { width: 96px; max-height: 96px; } }

/* Grid kategori ala marketplace */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(7, 1fr); } }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 10px; text-align: center; background: #fff; transition-property: transform, box-shadow, border-color; transition-duration: 150ms; transition-timing-function: ease-out; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); border-color: var(--orange); }
.cat-icon { font-size: 26px; line-height: 1; }
.cat-name { font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.cat-count { font-size: 11px; color: var(--muted); }

/* Dropdown pengiriman (dipencet baru muncul, bisa di-scroll) */
.dropdown { position: relative; }
.dropdown-btn { width: 100%; display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 12px; font-size: 14px; text-align: left; transition-property: border-color, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out; }
.dropdown-btn:hover { border-color: var(--orange); }
.dropdown-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.16); max-height: 264px; overflow-y: auto; overscroll-behavior: contain; z-index: 40; }
.dropdown-item { width: 100%; display: flex; gap: 10px; align-items: center; background: #fff; border: none; border-bottom: 1px solid #f5f5f5; padding: 12px; font-size: 14px; text-align: left; transition-property: background-color; transition-duration: 150ms; transition-timing-function: ease-out; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover, .dropdown-item:focus-visible { background: #fff5f2; }
.dropdown-item.selected { background: #fff5f2; }

/* Toast (aria-live) */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px); background: #222; color: #fff; padding: 10px 16px; border-radius: 24px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition-property: opacity, transform; transition-duration: 200ms; transition-timing-function: ease-out; z-index: 100; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Dialog konfirmasi sendiri (ganti confirm() browser) */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 90; overscroll-behavior: contain; }
.modal-card { background: #fff; border-radius: 12px; padding: 20px; max-width: 420px; width: 100%; box-shadow: 0 16px 48px rgba(0,0,0,.25); animation: modal-in 200ms ease-out; }
.modal-card h3 { font-size: 17px; margin-bottom: 8px; }
.modal-card p { font-size: 14px; color: #555; line-height: 1.6; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Error form inline + skeleton loading */
.form-error { color: #c62828; font-size: 13px; font-weight: 600; }
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Skip link (aksesibilitas) */
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--orange); padding: 10px 16px; font-weight: 700; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* Hormati prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}


/* ---- Audit lengkap v3 (skill: web-design-guidelines, ui-ux-polish, e-commerce) ---- */
body { font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Performa grid: content-visibility untuk 500 kartu (J5) */
.card { content-visibility: auto; contain-intrinsic-size: 300px 380px; }

/* Foto kategori di tile (D1) */
.cat-photo { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; border: 2px solid var(--line); }

/* Saran pencarian (D3) */
.search { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.16); z-index: 70; overflow: hidden; }
.suggest-title { padding: 8px 12px; font-size: 12px; color: var(--muted); font-weight: 700; }
.suggest-item { width: 100%; display: flex; gap: 10px; align-items: center; background: #fff; border: none; border-bottom: 1px solid #f5f5f5; padding: 9px 12px; font-size: 13px; text-align: left; }
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item:focus-visible { background: #fff5f2; }

/* Checkout berlangkah (F15) + ringkasan menempel */
.co-steps { display: flex; gap: 0; margin: 12px 0; }
.co-step { flex: 1; text-align: center; font-size: 11px; padding: 8px 2px; border-top: 3px solid #ddd; color: var(--muted); white-space: nowrap; }
.co-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid #f0f0f0; padding: 8px 0; }
.co-item span { flex: 1; min-width: 0; }
.co-item b { white-space: nowrap; flex-shrink: 0; }
.co-step.active { border-color: var(--orange); color: var(--text); font-weight: 700; }
.co-step.done { border-color: var(--green); color: var(--green); }
.co-summary { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 0 4px; margin-top: 16px; z-index: 5; }
.co-summary p { margin: 2px 0; }
.co-summary .btn { width: 100%; margin-top: 10px; min-height: 44px; }

/* Keranjang (R2-F4): thumb kiri, info kanan, aksi kanan-bawah */
.cart-item { border-bottom: 1px solid #f0f0f0; padding: 10px 0; }
.cart-item-main { display: flex; align-items: flex-start; gap: 10px; }
.cart-item-main input[type="checkbox"] { margin-top: 26px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info .cart-name { font-weight: 700; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 8px; padding-right: 2px; }
.cart-item-actions .btn-sm { min-width: 40px; }

/* Slot catatan kartu wishlist (R2-F13): tinggi tetap agar kartu sama tinggi */
.card-note { min-height: 30px; padding: 2px 10px 4px; }

/* Bantuan accordion (R2-F8) */
.help-topic { border-bottom: 1px solid var(--line); padding: 4px 0; }
.help-topic summary { font-size: 15px; font-weight: 700; cursor: pointer; padding: 10px 0; min-height: 40px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.help-topic summary::-webkit-details-marker { display: none; }
.help-topic summary::after { content: "›"; color: var(--orange); font-size: 20px; line-height: 1; transition: transform 150ms ease; }
.help-topic[open ] summary::after { transform: rotate(90deg); }
.help-topic p { padding-bottom: 10px; }

/* Baris pilih voucher ala Shopee + sheet pilih voucher (R2-voucher) */
.voucher-row { display: flex; align-items: center; gap: 10px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; min-height: 48px; }
.voucher-row-ic { color: var(--orange); display: flex; }
.voucher-row-disc { color: var(--orange); }
.modal-overlay.sheet { align-items: flex-end; padding: 0; }
.voucher-sheet { background: #fff; width: 100%; max-width: 560px; max-height: 82vh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; box-shadow: 0 -8px 32px rgba(0,0,0,.2); animation: modal-in 200ms ease-out; }
.voucher-sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; font-size: 16px; }
.voucher-sheet-list { overflow-y: auto; padding: 0 16px 12px; }
.voucher-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #eee; border-radius: 10px; padding: 12px; margin-bottom: 8px; cursor: pointer; }
.voucher-item.disabled { opacity: .6; cursor: not-allowed; background: #fafafa; }
.voucher-item.selected { border-color: var(--orange); background: #fff5f2; }
.voucher-item input[type="radio"] { width: auto; margin-top: 3px; }
.voucher-check { color: var(--orange); font-weight: 800; }
.voucher-sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

/* Flash sale satu baris horizontal (R2-owner-4): scroll-snap seperti carousel kategori */
.flash-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.flash-row .card { flex: 0 0 160px; scroll-snap-align: start; }

/* Kartu statistik profil (F16) */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fafafa; }
.stat-card b { display: block; font-size: 16px; color: var(--orange); }
.stat-card span { font-size: 12px; color: var(--muted); }

/* Tabel spesifikasi produk (C15) */
.spec-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.spec-table th, .spec-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #f0f0f0; }
.spec-table th { width: 130px; color: var(--muted); font-weight: 600; }

/* Ringkasan rating (C4) */
.rating-summary { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.dist-row { display: flex; gap: 8px; align-items: center; font-size: 12px; margin: 3px 0; }
.dist-bar { flex: 1; height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.dist-bar div { height: 100%; background: var(--gold); }

/* Galeri (C11, F2) */
.gallery-count { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 12px; }
.thumb-btn { border: 2px solid transparent; border-radius: 6px; padding: 0; background: none; cursor: pointer; }
.thumb-btn.on { border-color: var(--orange); }
.thumb-btn img { display: block; border-radius: 4px; }

/* Dots banner sebagai tombol (F3): area sentuh 30x23, bar visual tetap 22x5 */
.banner .dots button { width: 30px; height: 23px; padding: 9px 4px; background-clip: content-box; border-radius: 3px; background: rgba(255,255,255,.5); border: none; cursor: pointer; }
.banner .dots button.on { background: #fff; }

/* Empty state (F25) */
.empty-state { text-align: center; padding: 32px 16px; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* Sort (D2) */
.sort-wrap { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sort-wrap select { width: auto; padding: 6px 8px; }

/* Tombol kembali ke atas (F14) */
.back-to-top { position: fixed; right: 16px; bottom: 16px; z-index: 80; background: #222; color: #fff; border: none; border-radius: 24px; padding: 10px 16px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25); display: none; }

/* Aksi di toast (F20, B2) */
.toast-action { background: #fff; color: #222; border: none; border-radius: 16px; padding: 4px 12px; margin-left: 10px; font-weight: 700; cursor: pointer; }

/* Tombol X modal (F26) */
.modal-x { position: absolute; top: 10px; right: 10px; background: #f5f5f5; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-card { position: relative; }

/* Header ringkas saat scroll (F13) */
.topbar.compact .navlinks { display: none; }
.topbar.compact .topbar-inner { padding: 6px 12px; }

/* Status pesanan tambahan */
.status.Menunggu { background: #e3f2fd; color: #1565c0; }
.status.Dikirim { background: #fff3e0; color: var(--amber-text); }

/* ---- Perbaikan dari screenshot HP Anh 24 Nov 2026 (header, kategori geser,
   kartu kotak 1:1, galeri detail, spek, kartu toko, sticky bar) ----
   Skill: web-design-guidelines, ui-ux-polish, e-commerce — transisi hanya
   transform/opacity/box-shadow (150-300ms ease-out), hormati
   prefers-reduced-motion, target sentuh memadai, fokus terlihat. */

/* Cegah halaman bergeser horizontal (penyebab teks kepotong di tepi kanan).
   overflow-x: clip tidak membuat scroll container, jadi sticky topbar tetap jalan. */
html, body { overflow-x: clip; }

/* ============ HEADER RAPI (3 baris di HP, 1 baris di desktop) ============ */
.topbar-inner { flex-direction: column; align-items: stretch; gap: 8px; }
/* Anak .topbar-inner WAJIB width:100% — di flex column, min-width:auto
   membuat anak melebar mengikuti kontennya (lonceng + Top Up kepotong di
   screenshot Anh); min-width:0 saja TIDAK cukup (teruji di Chromium).
   width:100% memaksa anak selebar container; display:contents di desktop
   membuat aturan ini tidak berpengaruh di sana. */
.topbar-inner > * { width: 100%; min-width: 0; }
.topbar-inner .search { flex: none; width: 100%; }
.tb-top { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.tb-top .logo { flex: 0 0 auto; }
.tb-bell { position: relative; flex: 0 0 auto; margin-left: auto; }
.tb-actions { display: flex; gap: 6px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0; scroll-snap-type: x mandatory; scroll-padding: 0 12px; -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent); mask-image: linear-gradient(90deg, #000 94%, transparent); width: 100%; min-width: 0; }
.tb-actions::-webkit-scrollbar { display: none; }
.tb-actions .hbtn { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
.navlinks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; scroll-padding: 0 12px; -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent); mask-image: linear-gradient(90deg, #000 94%, transparent); }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
@media (min-width: 641px) {
  /* Desktop: kembali ke 1 baris seperti semula (logo, search, lonceng, aksi). */
  .topbar-inner { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .tb-top, .tb-actions { display: contents; }
  .topbar-inner .logo { order: 1; }
  .topbar-inner .search { order: 2; flex: 1; min-width: 200px; width: auto; }
  .tb-bell { order: 4; }
  .tb-actions > :nth-child(1) { order: 5; }
  .tb-actions > :nth-child(2) { order: 6; }
  .tb-actions > :nth-child(3) { order: 7; }
  .tb-actions > :nth-child(4) { order: 8; }
}

/* ============ KATEGORI CAROUSEL (geser horizontal, scroll-snap) ============ */
.cat-carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 12px 10px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent); mask-image: linear-gradient(90deg, #000 94%, transparent); }
.cat-carousel::-webkit-scrollbar { display: none; }
.cat-carousel .cat-tile { flex: 0 0 104px; scroll-snap-align: start; }
@media (min-width: 640px) { .cat-carousel .cat-tile { flex-basis: 132px; } }
.swipe-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============ FOTO KARTU KOTAK 1:1 (flash sale + grid biasa) ============ */
/* Wadah berasio tetap — foto portrait tidak boleh menentukan tinggi kartu. */
.card-media { aspect-ratio: 1 / 1; overflow: hidden; background: #eee; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============ GALERI DETAIL: foto utuh + swipe halus ============ */
.gallery { position: relative; }
.gallery-main-wrap { position: relative; border-radius: 8px; overflow: hidden; background: #f5f5f5; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1 / 1; background: #f5f5f5; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.gallery-track .gallery-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-count { bottom: 10px; right: 10px; white-space: nowrap; }
.thumbs { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0 12px 2px 0; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb-btn { flex: 0 0 auto; scroll-snap-align: start; }

/* ============ TABEL SPESIFIKASI RAPI ============ */
.spec-table { table-layout: fixed; }
.spec-table th { width: 104px; vertical-align: top; }
.spec-table td { overflow-wrap: anywhere; word-break: break-word; vertical-align: top; }

/* ============ KARTU TOKO ALA OLSHOP ============ */
.store-card { display: flex; gap: 12px; align-items: flex-start; }
.store-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); flex-shrink: 0; background: #eee; display: block; }
.store-avatar-fallback { width: 56px; height: 56px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; flex-shrink: 0; }
.store-info { flex: 1; min-width: 0; }
.store-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.store-name { font-size: 15px; font-weight: 800; color: var(--orange); }
.store-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.store-meta span { white-space: nowrap; }
.store-actions { display: flex; gap: 8px; margin-top: 10px; }
.store-actions .btn { flex: 1 1 0; min-width: 0; min-height: 40px; }

/* ============ STICKY BOTTOM BAR (detail produk, ala Shopee) ============ */
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
.sticky-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sb-price { flex: 1 1 100%; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sb-price b { color: var(--orange); font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sticky-bar .btn { min-height: 44px; transition-property: background-color, transform, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out; }
.sticky-bar .sb-cart { flex: 1; white-space: nowrap; }
.sticky-bar .sb-chat { flex: 0 0 auto; white-space: nowrap; }
.sticky-bar .sb-icon { flex: 0 0 44px; min-width: 44px; padding: 8px 0; text-align: center; }
@media (min-width: 640px) {
  .sb-price { flex: 0 1 auto; margin-right: auto; }
  .sticky-bar .sb-cart { flex: 0 1 320px; }
  .sticky-bar .sb-chat { flex: 0 0 auto; }
}
/* Ruang di bawah halaman + tombol Atas/toast naik supaya tidak tertutup bar. */
body.has-sticky-bar #view { padding-bottom: 96px; }
body.has-sticky-bar .back-to-top { bottom: 104px; }
body.has-sticky-bar .toast { bottom: 104px; }
@media (min-width: 640px) {
  body.has-sticky-bar #view { padding-bottom: 100px; }
  body.has-sticky-bar .back-to-top { bottom: 104px; }
  body.has-sticky-bar .toast { bottom: 104px; }
}

/* ---- Makeover UI/UX 2026-11-24 (skill: ux-designer, ui-design-makeover,
   frontend-design + web-design-guidelines, ui-ux-polish, e-commerce) ----
   Arah desain: "Shopee-grade marketplace polish" — oranye datar #ee4d2d,
   kartu putih ber-border hairline (bukan bayangan lembut di semua kartu),
   Plus Jakarta Sans (sudah dimuat), harga tabular, satu set ikon SVG
   (stroke 1.8, currentColor) menggantikan semua emoji struktural,
   tanpa gradient, tanpa string meta "A • B • C", tanpa "→" di ujung link.
   Target sentuh ≥40px, input 16px (anti zoom iOS), toast 4 detik. */

/* Ikon SVG: satu keluarga, stroke konsisten, warna ikut teks. */
.ic { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: -4px; }
.ic-sm { width: 16px; height: 16px; flex: 0 0 auto; vertical-align: -3px; }
.ic-lg { width: 24px; height: 24px; flex: 0 0 auto; vertical-align: -5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot.on { background: var(--green); }
.dot.off { background: #bbb; }

/* Sticky bar 1 baris di HP (ala Shopee): harga ringkas + tombol sebaris.
   Label "Harga", harga coret, dan badge diskon disembunyikan di HP supaya
   bar cukup 1 baris; di desktop tampil lengkap seperti semula. */
@media (max-width: 639px) {
  /* 2 baris di HP: baris 1 harga UTUH (tidak pernah terpotong), baris 2
     Chat + Wishlist + Bagikan + Keranjang sebaris. 1 baris tidak muat di
     320–390px (harga "Rp 27.500.000" + 4 tombol > lebar layar) — itu yang
     bikin harga kepotong dan "+ Keranjang" membungkus di screenshot Anh. */
  .sticky-bar { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .sticky-bar-inner { flex-wrap: wrap; gap: 6px; }
  .sb-price { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
  .sb-price .muted { font-size: 12px; }
  .sb-price b { font-size: 18px; }
  .sticky-bar .sb-cart { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
  .sticky-bar .sb-chat { padding: 8px 10px; }
  .sticky-bar .sb-icon { flex: 0 0 44px; }
  body.has-sticky-bar #view { padding-bottom: 132px; }
  body.has-sticky-bar .back-to-top { bottom: 140px; }
  body.has-sticky-bar .toast { bottom: 140px; }
}

/* Header ringkas saat scroll: hanya logo + search + lonceng + keranjang.
   Wishlist / Login / Top Up disembunyikan sampai scroll kembali ke atas. */
.topbar.compact .tb-actions .hbtn:not(.keep) { display: none; }
.topbar.compact .navlinks { display: none; }

/* Chip (ganti string "A • B • C" di hasil pencarian). */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 16px; padding: 4px 10px; font-size: 12px; background: #fff; }
.chip b { color: var(--orange); }

/* Tagline footer: 3 item dipisah garis vertikal, bukan "•". */
.foot-tag { display: flex; justify-content: center; flex-wrap: wrap; text-align: center; color: var(--muted); font-size: 12px; }
.foot-tag span { padding: 0 12px; }
.foot-tag span + span { border-left: 1px solid var(--line); }

/* Baris meta detail produk: item terpisah dengan garis, bukan "•". */
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--muted); margin-top: 6px; }
.meta-line span { padding: 0 10px; }
.meta-line span:first-child { padding-left: 0; }
.meta-line span + span { border-left: 1px solid var(--line); }

/* Baris data pesanan: label + nilai, bukan string "•". */
.order-meta { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 12px; color: var(--muted); margin: 2px 0; }
.order-meta span { padding: 0 8px; }
.order-meta span:first-child { padding-left: 0; }
.order-meta span + span { border-left: 1px solid var(--line); }

/* Footer: baris layanan dengan ikon SVG, bukan emoji. */
.foot-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 5px; }

/* Empty state: ikon SVG besar, bukan satu emoji. */
.empty-icon svg { width: 44px; height: 44px; color: #ccc; }

/* ---- Anti-kepotong + layout fluid 2026-11-24 (skill: ux-designer,
   ui-design-makeover, frontend-design, ui-ux-polish) ----
   Penyebab galeri meluber ke kanan: anak grid .detail-grid punya
   min-width:auto sehingga konten terpanjang mendorong lebar halaman
   melewati viewport (lalu html/body overflow-x:clip hanya menyembunyikan,
   bukan memperbaiki — foto jadi terpotong). Semua penampung dipaksa muat
   di lebar layar berapa pun: lebar fluid (%, max-width:100%), tanpa lebar
   tetap yang bisa meluber di HP sempit. */

/* Anak grid/flex boleh menyusut — pembunuh utama grid blowout. */
.detail-grid > * { min-width: 0; }
/* Galeri: pas di lebar viewport, foto di tengah dan utuh. */
.gallery, .gallery-main-wrap, .gallery-track { width: 100%; max-width: 100%; min-width: 0; }
.gallery-slide { min-width: 0; }
.gallery-track .gallery-slide img { max-width: 100%; }
.thumbs { width: 100%; max-width: 100%; }
.section, .container, #view { min-width: 0; }
img { max-width: 100%; }
.spec-table { width: 100%; }
.store-actions .btn { white-space: nowrap; }

/* Banner autoplay: pergantian slide halus (fade + geser tipis).
   prefers-reduced-motion sudah menonaktifkan animasi di blok atas. */
@keyframes bannerIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.banner-text, .banner-img { animation: bannerIn 300ms ease-out; }

/* HP sempit (≤400px): logo + saldo + lonceng harus tetap muat sebaris;
   label "Saldo:" disembunyikan supaya angka saldo utuh. */
@media (max-width: 400px) {
  .logo { font-size: 19px; }
  .bc-label { display: none; }
  .container { padding: 0 10px; }
  .section { padding: 12px; }
  .banner { padding: 16px 12px; min-height: 110px; }
  .banner h2 { font-size: 19px; }
  .banner p { font-size: 13px; }
  .banner-img { width: 72px; max-height: 72px; }
}

/* ---- Upgrade 24 Nov 2026: varian, filter harga, video galeri, promo toko ---- */
.variant-block { margin-top: 12px; }
.variant-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.variant-chip { min-height: 40px; min-width: 44px; padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px; background: #fff; font-size: 14px; font-weight: 700; color: var(--text); }
.variant-chip.selected { border-color: var(--orange); color: var(--orange); background: #fff3e0; }
.variant-chip:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.filter-chip { min-height: 40px; padding: 6px 12px; border: 1px solid #ddd; border-radius: 20px; background: #fff; font-size: 13px; font-weight: 600; color: var(--text); }
.filter-chip.on { border-color: var(--orange); color: var(--orange); background: #fff3e0; }
.filter-custom { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-custom input { width: 120px; min-width: 0; }
.gallery-video { background: #000; cursor: default; }
.gallery-video video, .gallery-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.thumb-video { width: 64px; height: 64px; background: #222; color: #fff; display: flex; align-items: center; justify-content: center; }
.thumb-video .ic { color: #fff; }
.store-promo { background: var(--orange); color: #fff; border-radius: 8px; padding: 14px; margin-top: 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.store-promo p { margin-top: 4px; font-size: 13px; opacity: .95; }
@media (max-width: 480px) {
  .filter-custom input { width: 104px; }
}
