:root {
  --primary: #0f766e; --accent: #f97362; --bg: #faf8f5; --surface: #fff; --text: #1f2933;
  --radius: 14px; --font: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --muted: color-mix(in srgb, var(--text) 58%, transparent);
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --soft: color-mix(in srgb, var(--primary) 9%, var(--surface));
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(0 0 0 / .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; padding: 11px 20px;
  border-radius: calc(var(--radius) * .75); background: var(--primary); color: #fff; font-weight: 600; text-decoration: none; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.07); } .btn:active { transform: translateY(1px); }
.btn.accent { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.light { background: var(--soft); color: var(--primary); }
.btn.danger { background: #dc2626; }
.btn.sm { padding: 7px 12px; font-size: .875rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 8px; border-radius: 10px; line-height: 0; }
.icon-btn:hover { background: var(--soft); }
label { display: block; font-size: .875rem; font-weight: 600; margin: 14px 0 6px; }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .6);
  background: var(--surface); outline: none; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea.input { min-height: 84px; resize: vertical; }
.row { display: flex; gap: 12px; } .row > * { flex: 1; }
.chip { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: .9rem; white-space: nowrap; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--primary); }

/* Store header */
.announce { background: var(--primary); color: #fff; text-align: center; font-size: .875rem; padding: 8px 12px; }
header.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.brand img { height: 40px; width: auto; border-radius: 8px; }
.brand .mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; font-size: .9rem; }
.search { flex: 1; max-width: 380px; margin-left: auto; }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: 0; right: 0; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.08; margin: 0 0 16px; letter-spacing: -.02em; }
.hero p { font-size: 1.1rem; color: var(--muted); margin: 0 0 26px; max-width: 520px; }
.hero-art { aspect-ratio: 1; border-radius: calc(var(--radius) * 2); overflow: hidden; background: var(--soft); box-shadow: var(--shadow); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art.gen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
.hero-art.gen img { border-radius: var(--radius); }

/* Sections & grid */
section.block { padding: 28px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sec-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.01em; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; transition: transform .15s; border: 1px solid var(--line); }
.card:hover { transform: translateY(-3px); }
.card .ph { aspect-ratio: 1; background: var(--soft); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { margin: 0; font-size: 1rem; }
.card .price { font-weight: 700; color: var(--primary); margin-top: auto; padding-top: 6px; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
.panel { background: var(--surface); border-radius: calc(var(--radius) * 1.4); padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.custom-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent))); color: #fff; }
.custom-cta h2 { margin: 0 0 6px; } .custom-cta p { margin: 0; opacity: .9; }
.custom-cta .btn { background: #fff; color: var(--primary); flex: none; }
footer { margin-top: 40px; padding: 30px 0 50px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a { color: inherit; margin-right: 14px; }

/* Modal & drawer */
.overlay { position: fixed; inset: 0; background: rgb(15 20 25 / .45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: calc(var(--radius) * 1.3); width: min(880px, 100%); max-height: 92vh; overflow: auto; position: relative; box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
.modal.narrow { width: min(560px, 100%); }
.modal .x { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--surface); }
.modal-pad { padding: 28px; }
.pd { display: grid; grid-template-columns: 1fr 1fr; }
.pd .gallery { background: var(--soft); }
.pd .gallery .main { aspect-ratio: 1; } .pd .gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.thumbs img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .6; border: 2px solid transparent; }
.thumbs img.on { opacity: 1; border-color: var(--primary); }
.pd h2 { margin: 0 0 6px; } .pd .price { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: 6px 0 4px; }
.opt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { background: none; border: 0; width: 38px; height: 38px; cursor: pointer; font-size: 1.1rem; }
.qty span { min-width: 30px; text-align: center; font-weight: 600; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); z-index: 51; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgb(0 0 0 / .15); animation: slide .2s; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer header h3 { margin: 0; }
.drawer .items { flex: 1; overflow: auto; padding: 8px 20px; }
.drawer footer { margin: 0; padding: 18px 20px; border-top: 1px solid var(--line); color: var(--text); }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--soft); }
.line .nm { font-weight: 600; font-size: .95rem; }
.sumrow { display: flex; justify-content: space-between; margin: 4px 0; }
.sumrow.total { font-weight: 700; font-size: 1.1rem; margin-top: 8px; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--primary); }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; margin-bottom: 10px; }
.choice input { margin-top: 4px; accent-color: var(--primary); }
.choice.on { border-color: var(--primary); background: var(--soft); }
.choice b { display: block; }
.gcash-box { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; background: var(--soft); padding: 16px; border-radius: var(--radius); margin: 8px 0 4px; }
.gcash-box img { border-radius: 10px; background: #fff; }
.gcash-num { font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; cursor: pointer; }
.drop img { max-height: 180px; margin: 10px auto 0; border-radius: 8px; }
.success { text-align: center; }
.success .tick { width: 66px; height: 66px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 2rem; margin: 0 auto 12px; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; font-weight: 700; background: var(--soft); padding: 8px 16px; border-radius: 10px; display: inline-block; }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; }
.toast.err { background: #b91c1c; } .toast.ok { background: #047857; }
.toast.out { opacity: 0; transform: translateY(8px); }
.demo-flag { position: fixed; left: 12px; bottom: 12px; z-index: 40; background: #111827; color: #fff; font-size: .75rem; padding: 6px 10px; border-radius: 8px; opacity: .85; }
.demo-flag a { color: #fcd34d; }
@keyframes fade { from { opacity: 0 } } @keyframes slide { from { transform: translateX(100%) } }

@media (max-width: 760px) {
  .hero .wrap, .pd { grid-template-columns: 1fr; }
  .hero { padding: 30px 0 10px; } .hero-art { max-width: 420px; }
  header.top .search { display: none; }
  .cart-btn { margin-left: auto; }
  .custom-cta { flex-direction: column; align-items: flex-start; }
  .gcash-box { grid-template-columns: 1fr; } .gcash-box img { max-width: 180px; }
  .row { flex-direction: column; gap: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card .bd { padding: 10px 12px 12px; }
  .card h3 { font-size: .92rem; }
}
#layer.still * { animation: none !important; }
