:root {
  --green: #2f5d3a;
  --green-dark: #23472c;
  --leaf: #5b8f4e;
  --leaf-soft: #e7f0e1;
  --cream: #faf7f0;
  --sand: #f1ebdd;
  --earth: #8a6d3b;
  --text: #1f2a22;
  --muted: #66705f;
  --line: #e2ddcf;
  --card: #ffffff;
  --danger: #b4412f;
  --warn: #a8641a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 42, 34, .06), 0 6px 20px rgba(31, 42, 34, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover { color: var(--leaf); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.2; margin: 0 0 .5em; color: var(--green-dark); }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.section { padding: 32px 16px 48px; }
.narrow { max-width: 560px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.warn { color: var(--warn); }
.print-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.25rem; color: var(--green-dark); }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { background: var(--leaf-soft); color: var(--green-dark); }
.cart-link { background: var(--green); color: #fff !important; }
.cart-link:hover { background: var(--green-dark) !important; }
.badge { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--green); font-size: .8rem; text-align: center; margin-left: 4px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.3rem; padding: 4px 10px; cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--card); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); }
  .nav-open .nav-links { display: flex; }
}

/* buttons + forms */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--green); color: #fff; font: 600 1rem Inter, sans-serif;
  padding: 12px 22px; border-radius: 999px; transition: background .15s;
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn-ghost:hover { background: var(--leaf-soft); color: var(--green-dark); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8f3222; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-block { display: block; width: 100%; margin: 12px 0; }
.link-btn { background: none; border: 0; color: var(--danger); cursor: pointer; font: inherit; font-size: .875rem; padding: 0; }

input, select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 4px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--leaf); outline-offset: 0; border-color: var(--leaf); }
label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 14px; }
label.check { display: flex; align-items: center; gap: 8px; }
label.check input, .radio-card input { width: auto; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: end; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid > .btn { justify-self: start; margin-bottom: 14px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--green); background: var(--leaf-soft); }
.inline-form { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.inline-form input { margin: 0; }
.inline-form .btn { white-space: nowrap; }
.filters { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filters input, .filters select { width: auto; flex: 1 1 200px; margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .inline-form { flex-direction: column; align-items: stretch; }
}

/* alerts + cards */
.flashes { padding-top: 16px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; border: 1px solid; }
.alert-success { background: #eaf5e6; border-color: #b9d9ad; color: #24502a; }
.alert-error { background: #fbecea; border-color: #eec1b9; color: #842f21; }
.alert-info { background: #f4efe2; border-color: #e0d5b8; color: #5d4a22; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card > h3:first-child { margin-top: 0; }
details.card summary { cursor: pointer; font-weight: 600; }
details.card[open] summary { margin-bottom: 12px; }

/* hero + home */
.hero { background: linear-gradient(135deg, var(--sand), var(--leaf-soft)); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--earth); margin: 0 0 8px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero-art { justify-self: center; max-width: 380px; }
@media (max-width: 760px) { .hero-inner { grid-template-columns: 1fr; } .hero-art { max-width: 240px; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 40px; padding-bottom: 8px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step span { font-family: Fraunces, serif; color: var(--leaf); font-weight: 700; }
.step h3 { margin: 6px 0; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }

.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-bottom: 48px; }
.trust div { background: var(--green); color: #fff; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.trust span { opacity: .85; font-size: .9rem; }
@media (max-width: 860px) { .trust { grid-template-columns: 1fr 1fr; } }

/* products */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.pc-img { background: var(--sand); aspect-ratio: 1; display: block; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { padding: 14px 16px 6px; display: flex; flex-direction: column; flex: 1; }
.pc-body p { margin: 0 0 4px; }
.pc-body h3 { font-size: 1.05rem; margin: 0 0 6px; }
.pc-body h3 a { text-decoration: none; color: inherit; }
.pc-body form { margin-top: auto; }
.price { font-weight: 600; font-size: 1.05rem; }
.price s { color: var(--muted); font-weight: 400; font-size: .9em; margin-left: 4px; }
.price.big { font-size: 1.6rem; margin: 8px 0 0; }
.off { color: var(--leaf); font-size: .85em; }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.pd-img { padding: 0; overflow: hidden; background: var(--sand); }
.add-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 20px 0 8px; }
.add-form label { margin: 0; width: 90px; }
.variants { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; text-decoration: none; color: var(--text); }
.chip.active { border-color: var(--green); background: var(--leaf-soft); font-weight: 600; }
.perks { padding-left: 20px; color: var(--muted); }
.description { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; gap: 20px; } }

/* cart + checkout + orders */
.cart-layout, .order-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cart-layout, .order-layout { grid-template-columns: 1fr; } }
.summary .row, .card .row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.row.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table input[type=number] { width: 72px; margin: 0; }
.cart-prod { display: flex; gap: 12px; align-items: center; }
.cart-prod img, .thumb { border-radius: 8px; object-fit: cover; background: var(--sand); }
@media (max-width: 680px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table td { border: 0; padding: 4px 0; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; }
}

.badge-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--sand); color: var(--earth); white-space: nowrap; }
.s-delivered, .s-placed, .s-confirmed { background: #e3f1dd; color: #2c5a2a; }
.s-shipped, .s-in_transit, .s-out_for_delivery, .s-packed { background: #e2ecf6; color: #2a4c73; }
.s-cancelled { background: #f6e3df; color: #8a3322; }
.s-return { background: #f3ead6; color: #6d521c; }

/* progress tracker */
.progress { list-style: none; padding: 0; margin: 12px 0 20px; display: flex; }
.progress li { flex: 1; position: relative; text-align: center; font-size: .78rem; color: var(--muted); padding-top: 26px; }
.progress li::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.progress li:first-child::before { display: none; }
.progress .dot { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1; }
.progress li.done, .progress li.current { color: var(--text); }
.progress li.done::before, .progress li.current::before { background: var(--leaf); }
.progress li.done .dot { background: var(--leaf); border-color: var(--leaf); }
.progress li.current .dot { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 4px var(--leaf-soft); }
.progress li.current { font-weight: 700; }
@media (max-width: 600px) {
  .progress { flex-direction: column; gap: 0; }
  .progress li { text-align: left; padding: 6px 0 14px 30px; }
  .progress li::before { left: 7px; top: -12px; width: 3px; height: 100%; }
  .progress .dot { left: 0; top: 6px; transform: none; }
}

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 12px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--leaf); border: 2px solid #fff; }
.timeline li:first-child::before { background: var(--green); box-shadow: 0 0 0 4px var(--leaf-soft); }

.track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.track-form label { margin: 0; }
@media (max-width: 680px) { .track-form { grid-template-columns: 1fr; } }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 8px; }
.stat strong { display: block; font-size: 1.6rem; font-family: Fraunces, serif; color: var(--green-dark); }
.stack .actions { margin-top: 4px; }

/* content pages */
.prose h2 { margin-top: 1.4em; font-size: 1.25rem; }
.prose li { margin-bottom: 6px; }

/* footer */
.site-footer { background: var(--green-dark); color: #dfe9da; margin-top: 40px; padding-top: 40px; }
.site-footer a { color: #dfe9da; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; margin: 0 0 10px; }
.brand-foot { font-family: Fraunces, serif; font-size: 1.3rem; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding-bottom: 24px; }
.copy { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 16px; padding-bottom: 24px; font-size: .85rem; opacity: .8; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* print = invoice */
@media print {
  .site-header, .site-footer, .no-print, .flashes, .order-layout > div { display: none !important; }
  .order-layout { display: block; }
  .print-only { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}
