/* The whole look of the shop and admin. Colours are tokens at the top - change them here. */
:root {
  --olive: #3f5d2a;
  --olive-dark: #2c421d;
  --leaf: #6f8f3c;
  --gold: #b9a032;
  --cream: #faf6ea;
  --sand: #f3ecd6;
  --card: #ffffff;
  --ink: #23261c;
  --muted: #6b6f5f;
  --line: #e4dcc4;
  --err: #b3261e;
  --ok: #2e7d32;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 38, 28, .06), 0 6px 20px rgba(35, 38, 28, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--olive); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.2; margin: 0 0 .5em; color: var(--olive-dark); }
h2 { font-size: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 24px; padding-bottom: 56px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; display: block; margin-top: 10px; }
.err-text { color: var(--err); font-size: .9rem; }
.ok-text { color: var(--ok); }
.page-title { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 12px; }

/* ---- header / footer ---- */
.announce { background: var(--olive-dark); color: var(--sand); text-align: center; font-size: .85rem; padding: 6px 16px; }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.25rem; color: var(--olive-dark); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--sand); }
.nav a.on { background: var(--olive); color: #fff; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #fff; font-size: .75rem; text-align: center; line-height: 20px; }
.site-footer { background: var(--olive-dark); color: #e9e4cf; padding: 40px 0 20px; }
.site-footer a { color: #fff; }
.site-footer h4 { margin: 0 0 8px; color: #fff; }
.site-footer p { margin: 4px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.footer-brand { font-family: Fraunces, Georgia, serif; font-size: 1.3rem; color: #fff; margin-bottom: 6px; }
.copyright { margin-top: 28px; font-size: .8rem; opacity: .7; }
.wa-float { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 20; }

/* ---- buttons / forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--olive); background: var(--olive); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--olive-dark); border-color: var(--olive-dark); }
.btn-ghost { background: transparent; color: var(--olive); }
.btn-ghost:hover { background: var(--sand); color: var(--olive-dark); }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--err); border-color: var(--err); }
.btn-danger:hover { background: #8c1d17; border-color: #8c1d17; }
.link-btn { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.link-btn:hover { color: var(--err); }
label { display: block; font-weight: 500; font-size: .95rem; margin: 12px 0 4px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--leaf); outline-offset: 0; border-color: var(--leaf); }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; }
.flash-ok { background: #e6f2e2; color: #1f5a23; }
.flash-err { background: #fbe5e3; color: #8c1d17; }

/* ---- home ---- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 24px 0 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--leaf); font-weight: 600; margin: 0 0 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.lead { font-size: 1.1rem; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 40px; }
.perk { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.perk strong { color: var(--olive-dark); }
.perk span { color: var(--muted); font-size: .9rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }

/* ---- product grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.card-img { aspect-ratio: 1; background: var(--sand); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.1rem; margin: 2px 0 6px; }
.card-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--leaf); font-weight: 600; }
.card-desc { color: var(--muted); font-size: .9rem; margin: 0 0 10px; flex: 1; }
.card-price { font-weight: 600; color: var(--olive-dark); }
.soldout { color: var(--err); font-weight: 600; font-size: .85rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: .9rem; }
.chip.on { background: var(--olive); color: #fff; border-color: var(--olive); }

/* ---- product page ---- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-img { background: var(--sand); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.sizes { border: 0; padding: 0; margin: 16px 0; }
.sizes legend { font-weight: 600; margin-bottom: 8px; }
.size { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 8px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 400; }
.size input { width: auto; margin: 0; accent-color: var(--olive); }
.size:has(input:checked) { border-color: var(--olive); background: #f6f8ef; }
.size.out { opacity: .55; cursor: not-allowed; }
.size-label { font-weight: 600; flex: 1; }
.size-price { font-weight: 600; color: var(--olive-dark); }
.size-price s { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: .9rem; }
.qty-row { display: flex; align-items: center; gap: 16px; margin: 12px 0 18px; }
.qty-row label { margin: 0; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.qty button { width: 40px; height: 40px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--olive); }
.qty input { width: 52px; text-align: center; border: 0; margin: 0; padding: 8px 0; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-buttons .btn { flex: 1; min-width: 140px; }
.description { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---- cart / checkout ---- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.cart-lines, .checkout-form, .summary, .panel, .order-box, .track-form, .pay-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.summary { position: sticky; top: 84px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr 70px 90px 32px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img { border-radius: 10px; object-fit: cover; background: var(--sand); }
.cl-info a { font-weight: 600; text-decoration: none; }
.cl-qty { margin: 0; padding: 8px; text-align: center; }
.cl-total { font-weight: 600; text-align: right; }
.cart-lines .btn { margin-top: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.sum-total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--olive-dark); }
.summary .btn { margin-top: 14px; }
.hint { font-size: .85rem; background: var(--sand); padding: 8px 10px; border-radius: 8px; }
.empty { text-align: center; padding: 48px 16px; background: var(--card); border-radius: var(--radius); }
.checkout-form h2 { margin-top: 18px; }
.checkout-form h2:first-of-type { margin-top: 0; }
.checkout-form .btn { margin-top: 20px; }
.pay-options { display: grid; gap: 8px; }
.pay-option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; margin: 0; cursor: pointer; font-weight: 400; }
.pay-option input { width: auto; margin-top: 4px; accent-color: var(--olive); }
.pay-option small { display: block; color: var(--muted); }
.pay-option:has(input:checked) { border-color: var(--olive); background: #f6f8ef; }

/* ---- success / track ---- */
.success { max-width: 620px; margin: 0 auto; text-align: center; }
.success .order-box, .success .pay-box { text-align: left; margin: 20px 0; }
.tick { width: 64px; height: 64px; border-radius: 50%; background: var(--leaf); color: #fff; font-size: 2rem; display: grid; place-items: center; margin: 8px auto 16px; }
.pay-box { border: 2px dashed var(--gold); }
.pay-box pre { white-space: pre-wrap; font: inherit; background: var(--sand); padding: 12px; border-radius: 8px; }
.track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.track-form label { margin: 0; }
.steps { display: flex; list-style: none; padding: 0; margin: 16px 0; gap: 4px; }
.steps li { flex: 1; text-align: center; font-size: .8rem; padding-top: 14px; position: relative; color: var(--muted); }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--line); }
.steps li.done { color: var(--olive-dark); font-weight: 600; }
.steps li.done::before { background: var(--leaf); }

/* ---- admin ---- */
.admin .site-header { background: var(--olive-dark); border: 0; }
.admin .logo, .admin .nav a { color: #fff; }
.admin .nav a:hover { background: rgba(255,255,255,.12); }
.admin .nav a.on { background: #fff; color: var(--olive-dark); }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat strong { font-size: 1.5rem; color: var(--olive-dark); }
.panel { margin-bottom: 20px; }
.panel.narrow { max-width: 480px; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel .table-wrap { box-shadow: none; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--sand); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; font-family: Inter, system-ui, sans-serif; vertical-align: middle; }
.pill-new { background: #fff3cd; color: #7a5a00; }
.pill-confirmed { background: #e3ecfb; color: #1d4e89; }
.pill-shipped { background: #ede4f7; color: #5a2d82; }
.pill-delivered { background: #e2f1e0; color: #1f5a23; }
.pill-cancelled { background: #f1e2e0; color: #8c1d17; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select, .filters input { width: auto; flex: 1; min-width: 160px; margin: 0; }
.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager a { padding: 6px 12px; border-radius: 8px; background: #fff; text-decoration: none; }
.pager a.on { background: var(--olive); color: #fff; }
.note { background: var(--sand); padding: 10px; border-radius: 8px; }
.v-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.v-row input { margin: 0; }
.v-head span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.edit-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--sand); }
.danger-zone { margin-top: 12px; }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-box { background: var(--card); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 400px; }
.login-box .btn { margin-top: 18px; }
.install-box { max-width: 520px; }
.install-box h2 { margin-top: 20px; font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 0 0 12px; font-size: .9rem; }
code { background: var(--sand); padding: 1px 6px; border-radius: 4px; }

/* ---- phone ---- */
@media (max-width: 860px) {
  .hero, .product, .cart-layout { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; margin: 0 auto; }
  .summary { position: static; }
  .perks { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .header-row { padding: 8px 0; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { padding: 6px 10px; font-size: .9rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px 12px 14px; }
  .card-desc { display: none; }
  .cart-line { grid-template-columns: 56px 1fr 56px; }
  .cart-line img { width: 56px; height: 56px; }
  .cl-total { grid-column: 2; text-align: left; }
  .cart-line .link-btn { grid-column: 3; grid-row: 2; justify-self: end; }
  .track-form { grid-template-columns: 1fr; }
  .v-row { grid-template-columns: 1fr 1fr; }
  .v-head { display: none; }
  .v-row .link-btn { justify-self: start; }
}

@media print {
  .site-header, .no-print, .wa-float, .announce { display: none !important; }
  body { background: #fff; }
  .panel, .cart-layout { box-shadow: none; display: block; }
}

/* Amounts never break over two lines; leave room under the floating WhatsApp button. */
.sum-row > span:last-child, .cl-total, .size-price { white-space: nowrap; }
.site-footer { padding-bottom: 84px; }
