:root {
  --primary: #F0A830;
  --primary-dark: #C9861A;
  --secondary: #E4283A;
  --bg: #FFFBF2;
  --surface: #FFFFFF;
  --text: #2B2118;
  --text-muted: #8A7A63;
  --border: #EFE3CC;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(43, 33, 24, 0.08);
  --shadow-lg: 0 12px 40px rgba(43, 33, 24, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  /* Inter/Poppins only cover Latin glyphs — Chinese text automatically falls
     through to the CJK system fonts later in the stack, so this upgrades
     English/Indonesian typography without pulling in a heavy CJK web font. */
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
h1, h2, h3, h4, .brand, .card-price, .section-title {
  font-family: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--primary-dark); flex-shrink: 0; }
.brand img { width: 40px; height: 40px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; max-width: 480px; }
.search-box i { color: var(--text-muted); font-size: 14px; }
.search-box input { border: none; background: transparent; outline: none; width: 100%; color: var(--text); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--text); }
.icon-btn:hover { background: var(--bg); color: var(--primary-dark); }
.badge { position: absolute; top: -4px; right: -4px; background: var(--secondary); color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.lang-switcher { position: relative; }
.lang-switcher select { appearance: none; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 8px 30px 8px 14px; font-size: 13px; font-weight: 600; color: var(--text); }
.btn { border-radius: 999px; padding: 10px 20px; font-weight: 700; font-size: 14px; border: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hero */
.hero { background: radial-gradient(circle at 80% 20%, rgba(240,168,48,0.25), transparent 60%), linear-gradient(135deg, #FFF6E0, #FFE9C2); padding: 56px 0; }
.hero-inner { display: flex; align-items: center; gap: 40px; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 42px; margin: 0 0 12px; color: var(--text); }
.hero-text p { font-size: 16px; color: var(--text-muted); margin: 0 0 24px; }
.hero-cat { width: 220px; height: 220px; filter: drop-shadow(0 20px 30px rgba(196, 130, 20, 0.35)); }

/* Categories */
.section { padding: 40px 0; }
.section-title { font-size: 22px; font-weight: 800; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.cat-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.cat-chip { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 96px; text-align: center; font-size: 13px; font-weight: 600; transition: transform 0.15s; }
.cat-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-chip.active { border-color: var(--primary); background: #FFF6E0; color: var(--primary-dark); }
.cat-chip i { font-size: 22px; color: var(--primary-dark); }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: box-shadow 0.15s, transform 0.15s; cursor: pointer; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: var(--bg); padding: 14px; }
.card-body { padding: 12px 14px 16px; }
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.card-price { color: var(--secondary); font-weight: 800; font-size: 16px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--text-muted); }

/* Drawer / Modal */
.overlay { position: fixed; inset: 0; background: rgba(43,33,24,0.5); z-index: 200; display: none; align-items: center; justify-content: center; }
.overlay.open { display: flex; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: var(--surface); z-index: 210; transform: translateX(100%); transition: transform 0.25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.modal { background: var(--surface); border-radius: 18px; width: min(480px, 92vw); max-height: 88vh; overflow-y: auto; padding: 28px; position: relative; }
.modal-close, .drawer-close { position: absolute; top: 16px; right: 16px; background: var(--bg); border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 14px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.modal-close:hover, .drawer-close:hover { background: var(--border); color: var(--text); }
.drawer-header { padding: 20px; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 18px; position: relative; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-footer { padding: 16px 20px; border-top: 1px solid var(--border); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; background: var(--bg); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }

.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.cart-item-info { flex: 1; }
.qty-control { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-control button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text); }
.qty-control button:disabled { opacity: 0.35; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 40px; margin-bottom: 14px; color: var(--border); display: block; }

.star-icon { color: #F5A623; }

.footer { background: #2B2118; color: #EFE3CC; padding: 40px 0; margin-top: 40px; font-size: 13px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 18px; }
.footer-links a { color: #D9C9A8; font-size: 12.5px; font-weight: 600; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow-lg); animation: fadein 0.2s; }
.toast i { font-size: 13px; color: var(--primary); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--primary-dark); }
.va-box { background: var(--bg); border: 1.5px dashed var(--primary); border-radius: 12px; padding: 18px; text-align: center; }
.va-number { font-size: 22px; font-weight: 800; letter-spacing: 1px; margin: 8px 0; }

#map-picker { height: 220px; border-radius: 12px; margin-bottom: 12px; }

@media (max-width: 720px) {
  .hero-inner { flex-direction: column-reverse; text-align: center; }
  .hero-text h1 { font-size: 30px; }
  .search-box { display: none; }
}

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filter-bar input[type=number] { width: 110px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; }
.filter-bar select { padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; }
.filter-checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.filter-checkbox input { width: auto; }
.filter-bar .btn { padding: 9px 16px; font-size: 13px; }

/* Wishlist heart on product card */
.card { position: relative; }
.wish-toggle {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; font-size: 15px; z-index: 2; opacity: 0.85;
}
.wish-toggle.active { color: var(--secondary); border-color: var(--secondary); }

/* Variant chips (product detail) */
.variant-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.variant-chip { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface); }
.variant-chip.selected { border-color: var(--primary); background: #FFF6E0; color: var(--primary-dark); }
.variant-chip:disabled { opacity: 0.4; text-decoration: line-through; }

/* Attributes table (product detail) */
.attr-table { width: 100%; font-size: 13px; border-collapse: collapse; margin-top: 10px; }
.attr-table td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.attr-table td:first-child { color: var(--text-muted); width: 40%; }

/* Account menu */
.account-menu-item { display: flex; align-items: center; gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; cursor: pointer; }
.account-menu-item:last-child { border-bottom: none; }
.account-menu-item:hover { color: var(--primary-dark); }

/* Notifications */
.notif-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); position: relative; }
.notif-item.unread { background: #FFF9EC; }
.notif-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); flex-shrink: 0; margin-top: 6px; }
.notif-item .body { flex: 1; }
.notif-item .title { font-weight: 700; font-size: 13.5px; }
.notif-item .text { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.notif-item .time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.coupon-row { display: flex; gap: 8px; margin: 10px 0; }
.coupon-row input { flex: 1; }
.coupon-applied-box { display: flex; justify-content: space-between; align-items: center; background: #DCF3E4; color: #2E8B57; border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 700; margin: 10px 0; }
.coupon-applied-box button { background: none; border: none; color: #2E8B57; font-size: 16px; }

/* Static content pages (About/Privacy/Terms/...), rendered from admin-authored
   WYSIWYG HTML — see public/page.html. */
.page-hero { background: linear-gradient(135deg, #FFF6E0, #FFE9C2); padding: 36px 0; text-align: center; }
.page-hero h1 { margin: 0; font-size: 28px; color: var(--text); }
.page-breadcrumb { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.page-breadcrumb a { color: var(--primary-dark); font-weight: 600; }
.static-page-body { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; }
.wysiwyg-content { font-size: 15px; line-height: 1.75; color: var(--text); }
.wysiwyg-content h1, .wysiwyg-content h2 { font-size: 22px; margin: 28px 0 12px; color: var(--text); }
.wysiwyg-content h1:first-child, .wysiwyg-content h2:first-child { margin-top: 0; }
.wysiwyg-content h3 { font-size: 17px; margin: 22px 0 8px; color: var(--primary-dark); }
.wysiwyg-content p { margin: 0 0 14px; }
.wysiwyg-content ul, .wysiwyg-content ol { margin: 0 0 14px; padding-left: 22px; }
.wysiwyg-content li { margin-bottom: 6px; }
.wysiwyg-content a { color: var(--primary-dark); text-decoration: underline; }
.wysiwyg-content strong { color: var(--text); }
.wysiwyg-content blockquote { margin: 0 0 14px; padding: 10px 16px; border-left: 3px solid var(--primary); background: var(--bg); color: var(--text-muted); }
.wysiwyg-content img { border-radius: 10px; margin: 12px 0; }
