/* base.css - dasar bersama situs pelanggan dan dashboard: token warna, reset, tipografi, tombol, formulir, dialog. */
:root {
  --maroon: #4a0f1b;
  --maroon-2: #6b1526;
  --red: #b3202e;
  --red-dark: #8f1824;
  --saffron: #f0b429;
  --ink: #231316;
  --muted: #6d5a5e;
  --bg: #f7f3ec;
  --surface: #fff;
  --paper: #f5e6bd;
  --paper-2: #ecd59f;
  --line: #e6dccb;
  --leaf: #2f7d3a;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(35, 19, 22, .08);
  --font-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --font-script: 'Kaushan Script', 'Brush Script MT', cursive;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--red); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .02em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--saffron); color: var(--ink); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .9rem; margin-top: .25rem; }
.empty { padding: 2rem 0; color: var(--muted); }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 2px solid transparent; border-radius: 999px; padding: .65rem 1.3rem; font: 700 1rem var(--font-body); cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-primary { background: var(--saffron); color: var(--ink); }
.btn-primary:hover { background: #ffc93f; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(35, 19, 22, .06); }
.btn-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-light:hover { background: rgba(255, 255, 255, .14); }
.btn-sm { padding: .35rem .95rem; font-size: .92rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--red); font: 600 .9rem var(--font-body); text-decoration: underline; cursor: pointer; }

/* Kartu, lencana, pengatur jumlah */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--saffron); color: var(--ink); }
.badge.off { background: #d8c9c0; }
.badge.warn { background: #ffd9a8; color: #6a3c00; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--red); border-radius: 999px; background: #fff; }
.stepper button { width: 2.1rem; height: 2.1rem; border: 0; background: transparent; font-size: 1.25rem; font-weight: 700; cursor: pointer; color: var(--red); }
.stepper span { min-width: 1.8rem; text-align: center; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 2rem; height: 2rem; border: 0; background: transparent; font-size: 1.2rem; font-weight: 700; cursor: pointer; color: var(--red); }
.qty span { min-width: 1.6rem; text-align: center; font-weight: 700; }

/* Formulir */
.field { margin-bottom: 1rem; }
.field label, .field .lbl, legend { display: block; font-weight: 700; margin-bottom: .25rem; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: .65rem .8rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: 1rem var(--font-body); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(179, 32, 46, .18); }
.search { border-radius: 999px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.radio { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; cursor: pointer; }
.radio input { width: 1.15rem; height: 1.15rem; accent-color: var(--red); }
.switch { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.switch input { width: 1.15rem; height: 1.15rem; accent-color: var(--leaf); }
.alert { padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 600; }
.alert.err { background: #f9d9d6; color: #7a130d; border: 1px solid #e2a29d; }
.alert.ok { background: #dcebd5; color: #1f4a1b; border: 1px solid #a9c99f; }
.alert.warn { background: #fdecc0; color: #624500; border: 1px solid #e7c570; }

/* Chip filter / kategori */
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: 2px; }
.chip { flex: none; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: .3rem .9rem; font: 600 .95rem var(--font-body); cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--red); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }

/* Daftar baris (keranjang, ringkasan) */
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.sub { color: var(--muted); font-size: .92rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.total-row { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; padding-top: .8rem; border-top: 2px solid var(--ink); margin-top: .6rem; }
.stars-static { color: var(--saffron); text-shadow: 0 0 1px #8a5a00; letter-spacing: .1em; font-size: 1.2rem; }
.layout2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .layout2 { grid-template-columns: 1fr; } }
.narrow { max-width: 560px; }
.narrow-wide { max-width: 720px; }

/* Dialog */
dialog { border: 0; border-radius: 16px; padding: 0; background: var(--surface); color: var(--ink); width: min(460px, 100% - 2rem); box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
dialog::backdrop { background: rgba(30, 5, 10, .6); }
.dlg { padding: 1.3rem; }
.dlg h3 { color: var(--red); margin-bottom: .2em; }
.dlg .row { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.1rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
