/* ==========================================================================
   Plant Shop Demo storefront
   ========================================================================== */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --text: #1d2621;
  --muted: #5b665f;
  --subtle: #8a938d;
  --border: #e4e1d9;
  --border-strong: #cfcbc1;
  --accent: #2e5c45;
  --accent-hover: #234836;
  --accent-soft: #e8efe9;
  --sale: #b42318;
  --sale-soft: #fdecea;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 25, .06);
  --shadow: 0 2px 6px rgba(20, 30, 25, .06), 0 10px 30px rgba(20, 30, 25, .08);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --header-h: 64px;
  color-scheme: light;
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 72px; }
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.no-scroll { overflow: hidden; }
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; font-weight: 650; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -48px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 8px; }
.muted { color: var(--muted); }
.latin { font-style: italic; color: var(--muted); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { font-size: 18px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); padding: 0 12px; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn.is-added { background: var(--accent-hover); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.link-btn:hover { color: var(--text); }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent;
  color: var(--text); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { font-size: 24px; }

/* Header ----------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(250, 249, 246, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "menu logo actions" "search search search"; align-items: center; column-gap: 4px; min-height: var(--header-h); }
.menu-btn { grid-area: menu; margin-left: -10px; }
.logo { grid-area: logo; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--text); justify-self: start; }
.logo svg { font-size: 26px; color: var(--accent); stroke-width: 2; }
.header-row .logo { white-space: nowrap; min-width: 0; }
@media (max-width: 359px) { .header-row .logo { font-size: 16px; gap: 6px; } .header-row .logo svg { font-size: 22px; } }
.header-actions { grid-area: actions; display: flex; align-items: center; margin-right: -10px; }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.3); } }
.main-nav { display: none; }

.search { grid-area: search; position: relative; display: none; padding-bottom: 12px; }
.site-header.search-open .search { display: block; }
.search input {
  width: 100%; height: 44px; padding: 0 16px 0 42px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  font-size: 16px; -webkit-appearance: none; appearance: none;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: absolute; left: 15px; top: 13px; font-size: 18px; color: var(--muted); pointer-events: none; }
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% - 6px); z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 6px; max-height: 70vh; overflow: auto;
}
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; }
.suggest-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.suggest-item .s-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.suggest-item .s-meta { font-size: 13px; color: var(--muted); }
.suggest-item .s-price { margin-left: auto; font-weight: 600; font-size: 14px; }
.suggest-item:hover, .suggest-item.active { background: var(--surface-2); }
.suggest-all { display: block; padding: 10px 8px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; border-top: 1px solid var(--border); margin-top: 4px; border-radius: 0 0 8px 8px; }
.suggest-all:hover, .suggest-all.active { background: var(--surface-2); }
.suggest-empty { padding: 14px 10px; color: var(--muted); font-size: 14px; }

@media (min-width: 900px) {
  .header-row { grid-template-columns: auto auto 1fr auto; grid-template-areas: "logo nav search actions"; column-gap: 28px; }
  .menu-btn, .search-toggle { display: none; }
  .main-nav { grid-area: nav; display: flex; gap: 4px; }
  .main-nav a { text-decoration: none; font-weight: 550; font-size: 15px; padding: 8px 12px; border-radius: 999px; color: var(--muted); }
  .main-nav a:hover { color: var(--text); background: var(--surface-2); }
  .main-nav a.active { color: var(--text); }
  .search { display: block; padding: 0; max-width: 420px; width: 100%; justify-self: end; }
  .search-suggest { top: calc(100% + 6px); }
  .header-actions { margin-right: -10px; }
}

/* Mobile nav drawer ------------------------------------------------------ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 20, 17, .45); z-index: 60; }
.mobile-nav { position: fixed; inset: 0 auto 0 0; width: min(88vw, 360px); background: var(--surface); z-index: 61; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slide-in .2s ease; }
@keyframes slide-in { from { transform: translateX(-100%); } }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--border); }
.logo-text { font-weight: 700; font-size: 18px; }
.mobile-nav-body { overflow: auto; padding: 8px 0 24px; }
.mobile-nav-body a { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; text-decoration: none; font-size: 16px; }
.mobile-nav-body a:hover { background: var(--surface-2); }
.mobile-nav-body .nav-group { padding: 18px 20px 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.mobile-nav-body .count { color: var(--subtle); font-size: 14px; }

/* Hero ------------------------------------------------------------------- */
.hero { position: relative; background: #c9d3c6; }
.hero img { width: 100%; height: 300px; object-fit: cover; object-position: 72% 50%; }
.hero-content { padding-top: 24px; padding-bottom: 8px; }
.hero-card { max-width: 480px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.hero-card .eyebrow { margin-bottom: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-wrap { background: var(--bg); }
@media (max-width: 899px) {
  .hero { background: none; }
  .hero-actions .btn { flex: 1 1 140px; }
}
@media (min-width: 900px) {
  .hero img { height: clamp(460px, 64vh, 620px); object-position: 60% 50%; }
  .hero-content { position: absolute; inset: 0; display: flex; align-items: center; padding-top: 0; padding-bottom: 0; }
  .hero-card { max-width: 580px; background: rgba(250, 249, 246, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 36px 36px 32px; border-radius: 20px; box-shadow: var(--shadow); }
}

/* Sections ---------------------------------------------------------------- */
.section { padding-top: 48px; }
.section:last-child { padding-bottom: 64px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(22px, 3.2vw, 30px); }
.section-head p { color: var(--muted); margin-top: 6px; }
.section-head a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: 15px; }
.section-head a:hover { text-decoration: underline; }
@media (min-width: 900px) { .section { padding-top: 72px; } .section:last-child { padding-bottom: 88px; } }

/* Category scroller ------------------------------------------------------ */
.cat-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.cat-scroller::-webkit-scrollbar { display: none; }
.cat-tile { scroll-snap-align: start; text-decoration: none; text-align: center; }
.cat-tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 999px; background: var(--surface-2); transition: transform .25s ease; }
.cat-tile:hover img { transform: scale(1.04); }
.cat-tile strong { display: block; margin-top: 10px; font-size: 14px; line-height: 1.3; font-weight: 600; }
.cat-tile span { display: block; font-size: 13px; color: var(--muted); }
@media (min-width: 1100px) {
  .cat-scroller { grid-auto-flow: row; grid-template-columns: repeat(9, 1fr); overflow: visible; margin: 0; padding: 0; }
}

/* Product grid & cards ---------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; } }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.035); }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.badge-sale { background: var(--sale); color: #fff; }
.card-body { display: flex; flex-direction: column; flex: 1; padding-top: 12px; }
.card-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.card-title { font-size: 15.5px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-latin { font-size: 13px; font-style: italic; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-foot { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: auto; padding-top: 10px; }
.card-foot .btn { width: 100%; }
@media (min-width: 1100px) {
  .card-foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .card-foot .btn { width: auto; }
}

.price { font-weight: 700; font-size: 16px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.price s { font-weight: 500; color: var(--subtle); font-size: .88em; }
.price.on-sale .now { color: var(--sale); }
.save-tag { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--sale); background: var(--sale-soft); border-radius: 999px; padding: 3px 9px; }

/* Promo banner ------------------------------------------------------------ */
.promo { position: relative; border-radius: 20px; overflow: hidden; background: #2b3d31; color: #fff; }
.promo img { width: 100%; height: 260px; object-fit: cover; object-position: 70% 50%; }
.promo-content { padding: 24px; background: #23352a; }
.promo h2 { font-size: clamp(24px, 3.4vw, 36px); margin-bottom: 20px; }
.promo .btn-primary { background: #fff; color: var(--text); }
.promo .btn-primary:hover { background: #eef2ec; }
@media (min-width: 900px) {
  .promo img { height: 440px; }
  .promo-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 48px; background: linear-gradient(90deg, rgba(20, 32, 24, .82) 0%, rgba(20, 32, 24, .55) 38%, rgba(20, 32, 24, 0) 62%); }
}

/* Breadcrumb -------------------------------------------------------------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); padding: 20px 0 8px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.breadcrumb span[aria-hidden] { color: var(--subtle); }

/* Shop / listing ---------------------------------------------------------- */
.shop-head { padding-bottom: 16px; }
.shop-head h1 { font-size: clamp(26px, 4vw, 38px); }
.shop-layout { display: block; padding-bottom: 64px; }
@media (min-width: 900px) { .shop-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; } }

.env-tabs { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 999px; gap: 2px; }
.env-tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 36px; }
.env-tabs button:hover { color: var(--text); }
.env-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 16px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.result-count { font-size: 14px; color: var(--muted); }
.select-wrap { position: relative; }
.select-wrap select { -webkit-appearance: none; appearance: none; height: 40px; padding: 0 36px 0 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 550; cursor: pointer; }
.select-wrap svg { position: absolute; right: 13px; top: 12px; font-size: 16px; pointer-events: none; color: var(--muted); }
.filter-toggle { height: 40px; min-height: 40px; }
@media (min-width: 900px) { .filter-toggle { display: none; } }
@media (max-width: 899px) {
  .env-tabs { width: 100%; }
  .env-tabs button { flex: 1; }
  .toolbar-right { width: 100%; margin-left: 0; }
  .toolbar-right > * { flex: 1 1 0; }
  .select-wrap select { width: 100%; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-hover); border: 0; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chip svg { font-size: 15px; }
.chip:hover { background: #dbe7de; }

/* Filters panel: off-canvas on mobile, sidebar on desktop */
.filters { position: fixed; inset: 0; z-index: 61; background: var(--surface); display: none; flex-direction: column; }
.filters.open { display: flex; animation: sheet-in .2s ease; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--border); }
.filters-head h2 { font-size: 18px; }
.filters-body { flex: 1; overflow: auto; padding: 4px 20px 20px; }
.filters-foot { display: flex; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.filters-foot .btn { flex: 1; }
.facet { border-bottom: 1px solid var(--border); padding: 16px 0; }
.facet:last-child { border-bottom: 0; }
.facet h3 { font-size: 15px; font-weight: 650; margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; cursor: pointer; }
.check .count { margin-left: auto; color: var(--subtle); font-size: 13px; }
.check.disabled { color: var(--subtle); cursor: default; }
@media (min-width: 900px) {
  .filters { position: sticky; top: calc(var(--header-h) + 20px); inset: auto; z-index: auto; display: block; background: transparent; max-height: calc(100vh - var(--header-h) - 72px); overflow: auto; padding-right: 4px; }
  .filters-head, .filters-foot { display: none; }
  .filters-body { padding: 0; overflow: visible; }
  .facet:first-child { padding-top: 0; }
  .check { font-size: 14.5px; padding: 5px 0; }
}

.empty-state { text-align: center; padding: 56px 16px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty-state h2 { font-size: 22px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }
.load-more { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 36px; }
.load-more p { font-size: 14px; color: var(--muted); }

/* Product detail ------------------------------------------------------------ */
.pdp { display: grid; gap: 24px; padding-bottom: 16px; }
.pdp-media { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info .eyebrow { margin-bottom: 8px; }
.pdp-info h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.025em; }
.pdp-info .latin { font-size: 17px; margin-top: 4px; }
.pdp-price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.pdp-price .price { font-size: 26px; }
.pdp-size { font-size: 15px; color: var(--muted); }
.pdp-size strong { color: var(--text); font-weight: 600; }
.highlights { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 24px; }
.highlights li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-hover); font-size: 13.5px; font-weight: 600; }
.highlights svg { font-size: 15px; }
.buy-row { display: flex; gap: 12px; align-items: stretch; }
.buy-row .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); height: 52px; }
.qty button { width: 44px; height: 100%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; border-radius: 999px; color: var(--text); }
.qty button:hover { background: var(--surface-2); }
.qty button:disabled { color: var(--subtle); cursor: default; background: transparent; }
.qty button svg { font-size: 18px; }
.qty input { width: 36px; border: 0; background: transparent; text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; padding: 0; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; }
.qty-sm { height: 40px; }
.qty-sm button { width: 36px; }
.qty-sm input { width: 30px; font-size: 15px; }
.assurances { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--muted); }
.assurances li { display: flex; align-items: center; gap: 10px; }
.assurances svg { font-size: 19px; color: var(--accent); }
.care { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.care h2 { font-size: 19px; margin-bottom: 16px; }
.care-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.care-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.care-item svg { font-size: 22px; color: var(--accent); margin-top: 1px; }
.care-item dt { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.care-item dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 8px; }
  .pdp-media { position: sticky; top: calc(var(--header-h) + 20px); margin: 0; border-radius: 20px; }
}

/* Cart -------------------------------------------------------------------- */
.page-title { font-size: clamp(28px, 4vw, 38px); padding: 8px 0 24px; }
.cart-layout { display: grid; gap: 28px; padding-bottom: 72px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; } }
@media (max-width: 899px) { .checkout-layout .summary { order: -1; } }
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.line { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.line-img { width: 88px; height: 88px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line-top { display: flex; justify-content: space-between; gap: 12px; }
.line-name { font-weight: 600; text-decoration: none; line-height: 1.3; }
.line-name:hover { text-decoration: underline; }
.line-meta { font-size: 14px; color: var(--muted); }
.line-total { font-weight: 700; white-space: nowrap; }
.line-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
@media (min-width: 700px) { .line { grid-template-columns: 112px minmax(0, 1fr); gap: 20px; } .line-img { width: 112px; height: 112px; } }

.summary { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
@media (min-width: 900px) { .summary { position: sticky; top: calc(var(--header-h) + 20px); } }
.summary h2 { font-size: 19px; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 16px; font-size: 18px; font-weight: 700; }
.summary .btn-block { margin-top: 18px; }
.continue { display: inline-flex; margin-top: 14px; font-size: 15px; color: var(--accent); font-weight: 600; text-decoration: none; }
.continue:hover { text-decoration: underline; }

/* Checkout -------------------------------------------------------------------- */
.checkout-form { display: grid; gap: 28px; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset legend { font-size: 19px; font-weight: 650; margin-bottom: 14px; padding: 0; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; grid-column: span 6; }
.field label { font-size: 14px; font-weight: 600; }
.field .optional { color: var(--subtle); font-weight: 500; }
.field input, .field select {
  height: 48px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  font-size: 16px; width: 100%; -webkit-appearance: none; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b665f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input:user-invalid, .field select:user-invalid { border-color: var(--sale); }
@media (min-width: 600px) {
  .span-3 { grid-column: span 3; }
  .span-2 { grid-column: span 2; }
}
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #fbfdfb; }
.radio-card input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.radio-card .rc-body { flex: 1; min-width: 0; }
.radio-card .rc-title { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.radio-card .rc-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.pay-logos { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pay-logos span { font-size: 11px; font-weight: 700; letter-spacing: .04em; border: 1px solid var(--border-strong); border-radius: 5px; padding: 2px 6px; color: var(--muted); background: var(--surface); }
.mini-lines { list-style: none; margin: 0 0 14px; padding: 0 0 6px; border-bottom: 1px solid var(--border); display: grid; gap: 12px; }
.mini-line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.mini-thumb { position: relative; width: 56px; height: 56px; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.mini-thumb .qty-badge { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; border-radius: 999px; background: var(--muted); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.mini-line .n { font-weight: 600; line-height: 1.3; }
.mini-line .m { color: var(--muted); font-size: 13px; }
.mini-line .p { font-weight: 600; }
.checkout-submit { margin-top: 4px; }
.checkout-submit .btn { width: 100%; }

/* Not found ------------------------------------------------------------------- */
.not-found { text-align: center; padding: 96px 0; }
.not-found h1 { font-size: 34px; margin-bottom: 10px; }
.not-found p { color: var(--muted); margin-bottom: 24px; }

/* Footer ---------------------------------------------------------------------- */
.site-footer { background: #1f2c24; color: rgba(255, 255, 255, .78); margin-top: auto; }
.footer-grid { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 48px; padding-bottom: 36px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .logo { color: #fff; }
.footer-brand .logo svg { color: #9cc3a9; }
.footer-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 14px; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14.5px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13.5px; color: rgba(255, 255, 255, .6); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } .footer-brand { grid-column: auto; } }

/* Toast ----------------------------------------------------------------------- */
.toast-region { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
@media (min-width: 700px) { .toast-region { left: auto; right: 24px; bottom: 24px; width: 380px; } }
.toast { pointer-events: auto; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); animation: toast-in .22s ease; }
.toast.leaving { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(12px); opacity: 0; } }
.toast img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.toast-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.toast-title svg { font-size: 15px; }
.toast-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* Dialog ---------------------------------------------------------------------- */
.dialog { border: 0; border-radius: 20px; padding: 28px 24px 22px; width: min(92vw, 380px); box-shadow: 0 24px 80px rgba(0, 0, 0, .25); text-align: center; color: var(--text); background: var(--surface); }
.dialog::backdrop { background: rgba(15, 20, 17, .45); }
.dialog-icon { width: 48px; height: 48px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.dialog-icon svg { font-size: 24px; }
.dialog h2 { font-size: 20px; margin-bottom: 8px; }
.dialog p { color: var(--muted); margin-bottom: 20px; font-size: 15px; }
