:root {
  --red: #8B1A1A;
  --red-dark: #6b1212;
  --red-light: #a8321f;
  --black: #181414;
  --cream: #faf6ef;
  --gold: #c9a227;
  --text: #2a2220;
  --muted: #7a6f68;
  --border: #ece3d6;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(24,20,20,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: none; cursor: pointer;
  font-weight: 700; font-size: 15px; transition: .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; border: 2px solid var(--red); color: var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Header ===== */
.topbar { background: var(--black); color: #e9e2d8; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #e9e2d8; }
header.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 12px; position: relative; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: var(--black); white-space: nowrap; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.logo span.badge { color: var(--red); }
.main-nav { display: flex; gap: 22px; font-weight: 600; font-size: 15px; flex-wrap: wrap; }
.main-nav a:hover { color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.cart-pill { position: relative; background: var(--red); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 700; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.cart-pill .count { background: #fff; color: var(--red); border-radius: 999px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, var(--black) 0%, var(--red-dark) 60%, var(--red) 100%); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.hero .wrap { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; }
.hero-text h1 { font-size: 40px; line-height: 1.15; margin: 0 0 16px; }
.hero-text p { font-size: 17px; opacity: .92; margin-bottom: 26px; max-width: 480px; }
.hero-badges { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; }

.hero-visual { flex: 1 1 320px; max-width: 360px; margin: 0 auto; }
.hero-visual-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; padding: 22px; backdrop-filter: blur(6px); box-shadow: 0 25px 50px rgba(0,0,0,.35); }
.hero-visual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-visual-item { background: #fff; border-radius: 14px; padding: 16px 10px; text-align: center; }
.hero-visual-item .ic { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.hero-visual-item .lbl { font-size: 12px; font-weight: 700; color: var(--black); }

/* ===== Section ===== */
.section { padding: 56px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 10px; }
.section-title h2 { font-size: 28px; margin: 0; }
.section-title a { color: var(--red); font-weight: 700; font-size: 14px; }

/* ===== Category pills ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.cat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 16px; text-align: center; transition: .15s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--red); }
.cat-card .ic { font-size: 38px; margin-bottom: 10px; }
.cat-card .name { font-weight: 700; font-size: 14px; }

/* ===== Product grid ===== */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.prod-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .15s; }
.prod-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.prod-thumb { height: 150px; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.prod-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.prod-name { font-size: 16px; font-weight: 700; margin: 0; }
.prod-price { font-size: 18px; font-weight: 800; color: var(--red); margin-top: auto; }
.prod-price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.badge-featured { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.prod-thumb-wrap { position: relative; }
.out-of-stock-tag { position: absolute; inset: 0; background: rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--black); font-size: 13px; }

/* ===== Product detail ===== */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
@media (max-width: 860px) { .pd-grid { grid-template-columns: 1fr; gap: 28px; } }
.pd-visual { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 160px; min-height: 340px; }
.pd-info h1 { font-size: 30px; margin: 0 0 8px; }
.pd-desc { color: var(--muted); margin-bottom: 20px; }
.pd-price { font-size: 30px; font-weight: 800; color: var(--red); margin-bottom: 4px; }
.pd-price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.gram-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.gram-presets { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.gram-presets button { border: 2px solid var(--border); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; font-size: 14px; }
.gram-presets button.active { border-color: var(--red); background: var(--red); color: #fff; }
.gram-custom { display: flex; align-items: center; gap: 10px; }
.gram-custom input[type=number] { width: 110px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; }
.gram-total { font-size: 22px; font-weight: 800; margin: 14px 0; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty-stepper button { background: #fff; border: none; width: 36px; height: 36px; font-size: 18px; cursor: pointer; }
.qty-stepper span { width: 40px; text-align: center; font-weight: 700; }

/* ===== Cart / Checkout ===== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table-cart { width: 100%; min-width: 560px; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.table-cart th, .table-cart td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table-cart th { background: var(--cream); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.cart-remove { color: var(--red); font-weight: 700; cursor: pointer; background: none; border: none; }
.summary-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; font-size: 20px; font-weight: 800; color: var(--red); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 14px; }
.form-group.full { grid-column: 1 / -1; }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--black); }
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); }
.pay-options { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 20px; }
.pay-option { flex: 1 1 200px; border: 2px solid var(--border); border-radius: var(--radius); padding: 16px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.pay-option.selected { border-color: var(--red); background: #fdf3f0; }
.pay-option input { width: auto; }

/* ===== Alerts ===== */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; font-size: 14px; }
.alert-success { background: #e9f7ef; color: #1f7a45; border: 1px solid #bfe8cf; }
.alert-error { background: #fdecec; color: #a62626; border: 1px solid #f5c2c2; }

/* ===== Order status ===== */
.order-track-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.status-steps { display: flex; justify-content: space-between; margin: 28px 0; flex-wrap: wrap; gap: 10px; }
.status-step { flex: 1; text-align: center; min-width: 90px; }
.status-step .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--border); margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; }
.status-step.done .dot { background: var(--red); }
.status-step .lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.status-step.done .lbl { color: var(--black); }

/* ===== Footer ===== */
footer.site-footer { background: var(--black); color: #cfc6bd; margin-top: 50px; }
footer.site-footer .wrap { padding: 46px 20px 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
footer.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 15px; }
footer.site-footer a { color: #cfc6bd; display: block; margin-bottom: 8px; font-size: 14px; }
footer.site-footer a:hover { color: var(--gold); }
.footer-bottom { text-align: center; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #998f85; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .ic { font-size: 60px; margin-bottom: 16px; }

/* mobile nav toggle */
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--black); font-size: 20px; line-height: 1; width: 40px; height: 40px; cursor: pointer; flex-shrink: 0; }
@media (max-width: 860px) {
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); z-index: 60; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .logo { font-size: 18px; }
  .cart-pill { padding: 9px 12px; font-size: 13px; }
  .hero { padding: 40px 0; }
  .hero-text h1 { font-size: 26px; }
  .hero-text p { font-size: 15px; }
  .hero-visual { max-width: 280px; margin-top: 10px; }
  .hero-visual-item .ic { font-size: 28px; }
}
