/* Leaf & Pot sample shop */

:root {
  --bg: #f4f7f2;
  --surface: #ffffff;
  --ink: #18261d;
  --ink-soft: #4b5c51;
  --green: #24573a;
  --green-dark: #163a26;
  --green-mid: #3f9a5c;
  --lime: #d3ec74;
  --line: #d3ddd2;
  --error: #b42318;
  --focus: #1d5fd6;
  --radius: 14px;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-lead: 1.1875rem;
  --text-meta: 0.9375rem;
  --text-fine: 0.875rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5vw + 0.8rem, 3.75rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.625rem, 1.5vw + 1.2rem, 2.25rem); }
h3 { font-size: 1.375rem; line-height: 1.2; }

p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }

::selection { background: var(--lime); color: var(--ink); }

a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-dark); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 640px) {
  .wrap { padding-inline: 28px; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- yvalid sample bar (deliberately outside the shop's styling) ---------- */

.demo-bar {
  background: #111214;
  color: #e6e6e6;
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
  padding: 7px 16px;
  text-align: center;
}
.demo-bar p { margin: 0; }
.demo-bar a { color: #fff; font-weight: 600; text-decoration: underline; }
.demo-bar a:hover { color: #cfd8ff; }
.demo-bar a:focus-visible { outline-color: #8fb3ff; }

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { width: 30px; height: 30px; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}
.site-nav a:hover { background: #e9f0e6; color: var(--ink); }
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--green-mid);
  border-radius: 0;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.cart-link svg { width: 20px; height: 20px; }
.cart-link:hover { background: var(--ink); color: #fff; }
.cart-count {
  min-width: 1.6em;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: var(--text-fine);
  font-variant-numeric: tabular-nums lining-nums;
  text-align: center;
  line-height: 1.6;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 10px 6px;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 820px) {
  .js .nav-toggle { display: inline-flex; order: 2; }
  .js .cart-link { order: 3; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--green-mid); padding-left: 16px; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 8px; }
  html:not(.js) .site-nav { order: 4; width: 100%; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

@media (max-width: 400px) {
  .cart-label { display: none; }
  .brand { font-size: 1.2rem; }
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--green-dark); }
.btn-outline:hover { background: var(--green-dark); color: #fff; }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: var(--text-meta); }
.btn-block { width: 100%; }
.btn.is-done { background: var(--lime); border-color: var(--lime); color: var(--ink); }

.text-link { font-weight: 600; }

.link-btn {
  background: none;
  border: 0;
  padding: 4px 2px;
  font: inherit;
  font-size: var(--text-meta);
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-btn:hover { color: var(--error); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(48px, 7vw, 88px); }
.section + .section:not(.light-check, .delivery) { padding-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
}
.section-head h2 { margin: 0; }

.lead { font-size: var(--text-lead); line-height: 1.5; color: var(--ink-soft); max-width: 36em; }

.page-head { padding-top: 40px; padding-bottom: 8px; }

/* ---------- Hero ---------- */

.hero { background: var(--green-dark); color: #f1f6ee; overflow: hidden; }
.hero-inner {
  display: grid;
  gap: 40px;
  padding-block: 48px 0;
}
.hero h1 { color: #fff; max-width: 13ch; }
.hero .lead { color: #c9dccb; }
.hero .btn { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.hero .btn:hover { background: #fff; border-color: #fff; }
.hero .btn-outline { background: transparent; border-color: #c9dccb; color: #fff; }
.hero .btn-outline:hover { background: #fff; border-color: #fff; color: var(--ink); }
.hero :focus-visible { outline-color: #9fc2ff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-art {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: end;
  padding-bottom: 0;
}
.hero-tile {
  background: var(--tile);
  border-radius: var(--radius) var(--radius) 0 0;
  aspect-ratio: 1;
}
.hero-tile-a { grid-row: span 2; aspect-ratio: 4 / 5; }
.hero-tile-a .art { width: 100%; height: 100%; }
.hero-tile-b { border-radius: var(--radius); }
.shelf { display: none; }

@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    padding-block: 72px 0;
  }
  .hero-copy { padding-bottom: 72px; }
  .hero-art { align-self: end; }
}

/* ---------- Promise strip ---------- */

.promise {
  list-style: none;
  margin-block: 0;
  display: grid;
  gap: 0;
}
.promise li {
  padding: 20px 0;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.promise li:first-child { border-top: 0; }
.promise li:last-child { border-bottom: 1px solid var(--line); }
.promise strong { display: block; color: var(--ink); font-size: 1.05rem; }

@media (min-width: 760px) {
  .promise { grid-template-columns: repeat(3, 1fr); }
  .promise li { border-top: 0; border-bottom: 1px solid var(--line); padding: 28px 24px 28px 0; }
  .promise li + li { border-left: 1px solid var(--line); padding-left: 24px; }
}

/* ---------- Categories ---------- */

.cats {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 760px) {
  .cats { grid-template-columns: 1.3fr 1fr 1fr; }
}
.cat a {
  display: grid;
  gap: 6px;
  height: 100%;
  padding: 24px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.cat a:hover { border-color: var(--ink); }
.cat-easy a { background: #cde3c3; }
.cat-low a { background: #233d33; color: #eaf3e9; }
.cat-pots a { background: #f3c6b5; }
.cat-icon { width: 44px; height: 44px; margin-bottom: 20px; color: var(--green); }
.cat-low .cat-icon { color: var(--lime); }
.cat-pots .cat-icon { color: #8a3f26; }
.cat-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.cat-count { margin-top: 12px; font-weight: 600; font-size: var(--text-meta); font-variant-numeric: tabular-nums lining-nums; }
.cat-low a:focus-visible { outline-color: var(--focus); }

/* ---------- Product grid and cards ---------- */

.grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 14px;
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 20px; } }
@media (min-width: 1020px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; }
.card-link { color: var(--ink); text-decoration: none; display: block; }
.card-link:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

.tile {
  display: block;
  background: var(--tile, #dfe8dc);
  border-radius: var(--radius);
  aspect-ratio: 1;
  overflow: hidden;
}
.tile .art { width: 100%; height: 100%; transition: transform 0.25s ease; transform-origin: 50% 90%; }
.card-link:hover .art { transform: scale(1.04); }

.card-name {
  display: block;
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  text-wrap: balance;
}
.card-link:hover .card-name { text-decoration: underline; text-underline-offset: 0.15em; }
.card-latin { margin: 2px 0 0; font-size: var(--text-meta); color: var(--ink-soft); font-style: italic; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 8px 0 0;
  font-size: var(--text-fine);
  line-height: 1.4;
  color: var(--ink-soft);
}
.meta-light, .meta-care { display: inline-flex; align-items: center; gap: 5px; }
.meta-light::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #e2b93b;
  box-shadow: 0 0 0 2px #f6e3a3;
}
.meta-care::before {
  content: "";
  width: 8px; height: 11px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--green-mid);
}
.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}
.price { font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Light check ---------- */

.light-check { border-top: 1px solid var(--line); }
.steps {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 24px;
  counter-reset: step;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--lime);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
}
.steps p { color: var(--ink-soft); margin: 0; }

/* ---------- Delivery ---------- */

.delivery { background: var(--surface); border-block: 1px solid var(--line); }
.delivery-inner { display: grid; gap: 28px; }
@media (min-width: 860px) { .delivery-inner { grid-template-columns: 1fr 1.6fr; gap: 56px; } }
.delivery-list { margin: 0; }
.delivery-list div {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.delivery-list div:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 560px) { .delivery-list div { grid-template-columns: 11rem 1fr; gap: 16px; } }
.delivery-list dt { font-weight: 700; }
.delivery-list dd { margin: 0; color: var(--ink-soft); }

/* ---------- Shop page ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 12px;
}
.filters a {
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
}
.filters a:hover { border-color: var(--ink); }
.filters a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.shop-count { color: var(--ink-soft); font-size: var(--text-meta); font-variant-numeric: tabular-nums lining-nums; margin-bottom: 24px; }

/* ---------- Product page ---------- */

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  margin: 24px 0;
  font-size: var(--text-meta);
  color: var(--ink-soft);
}
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #9aa89d; }

.product-layout { display: grid; gap: 28px; }
@media (min-width: 860px) {
  .product-layout { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
  .tile-large { position: sticky; top: 24px; }
}
.tile-large { border-radius: 20px; }

.product-info h1 { margin-bottom: 4px; }
.product-latin { font-style: italic; color: var(--ink-soft); margin-bottom: 16px; }
.product-price { font-family: var(--display); font-size: 1.875rem; font-weight: 700; line-height: 1.2; margin-bottom: 8px; font-variant-numeric: tabular-nums lining-nums; }
.product-summary { font-size: var(--text-lead); line-height: 1.5; max-width: 36em; }

.buy { margin: 24px 0 28px; padding: 20px 0; border-block: 1px solid var(--line); }
.buy label { display: block; font-weight: 600; margin-bottom: 8px; }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; }
.buy-status { margin: 12px 0 0; min-height: 1.5em; }
.buy-status:empty { margin: 0; min-height: 0; }

.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.stepper button {
  width: 44px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.stepper button:hover { background: #e9f0e6; }
.stepper button[aria-disabled="true"] { color: #a7b3aa; cursor: not-allowed; background: none; }
.stepper button:focus-visible { outline-offset: -3px; }
.stepper input {
  width: 3.2em;
  border: 0;
  border-inline: 1px solid var(--line);
  text-align: center;
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus-visible { outline-offset: -3px; }
.stepper output {
  display: grid;
  place-items: center;
  min-width: 2.4em;
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
}
.stepper-small button { width: 38px; height: 38px; }

.facts { margin: 0 0 24px; }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--ink-soft); }
.product-desc p { max-width: 36em; }

.not-found { padding-block: 64px; }

/* ---------- Cart ---------- */

.notice {
  background: #fff4d1;
  border: 1px solid #d6a400;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 24px;
}

.cart-empty { padding: 24px 0 64px; font-size: var(--text-lead); }

.cart-layout { display: grid; gap: 40px; padding-bottom: 72px; }
@media (min-width: 900px) {
  .cart-layout { grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
}

.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  grid-template-areas:
    "thumb info total"
    "thumb qty qty";
  gap: 8px 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.tile-thumb { grid-area: thumb; width: 72px; border-radius: 10px; }
.line-info { grid-area: info; display: grid; }
.line-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.line-name:hover { text-decoration: underline; }
.line-unit { font-size: var(--text-meta); color: var(--ink-soft); font-variant-numeric: tabular-nums lining-nums; }
.line-qty { grid-area: qty; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.line-total { grid-area: total; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
@media (min-width: 600px) {
  .line { grid-template-columns: 88px 1fr auto 6rem; grid-template-areas: "thumb info qty total"; align-items: center; }
  .tile-thumb { width: 88px; }
  .line-total { text-align: right; }
}

.summary { margin-top: 24px; }
.summary-head { font-size: 1.375rem; line-height: 1.2; }
.summary dl, #cart-summary { margin: 0; }
#cart-summary { font-variant-numeric: tabular-nums lining-nums; }
#cart-summary div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
#cart-summary dd { margin: 0; }
#cart-summary .summary-total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
}
.delivery-hint {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #e5f1d8;
  font-size: var(--text-meta);
}

.checkout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}
@media (min-width: 600px) { .checkout { padding: 28px; } }
.checkout-note { color: var(--ink-soft); font-size: var(--text-meta); }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.hint { margin: 0 0 6px; font-size: var(--text-meta); color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 2px solid #9fb0a3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.field textarea { resize: vertical; min-height: 5.5em; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--focus); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--error); }
.error { margin: 6px 0 0; color: var(--error); font-size: var(--text-meta); font-weight: 600; }
.error:empty { display: none; }

.confirmation {
  background: #e5f1d8;
  border: 1px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 72px;
  max-width: 44em;
}
.confirmation h2 { font-size: 1.6rem; }
.confirmation h2:focus { outline: none; }
.confirmation h2:focus-visible { outline: 3px solid var(--focus); }

#cart-heading:focus { outline: none; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #cdd8cf;
  padding-top: 48px;
  font-size: 1rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--lime); }
.site-footer :focus-visible { outline-color: #9fc2ff; }
.footer-inner { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-brand { font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: #fff; margin-bottom: 6px; }
.footer-head { font-size: 1.25rem; line-height: 1.2; color: #fff; margin-bottom: 10px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-small { margin: 40px auto 0; padding-block: 20px; border-top: 1px solid #33443a; font-size: var(--text-fine); color: #9db0a2; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card-link:hover .art { transform: none; }
}
