:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1c1b19;
  --ink-2: #57534c;
  --line: #e4ded4;
  --accent: #1f5c4a;
  --accent-ink: #ffffff;
  --accent-soft: #e3eee9;
  --warn-bg: #fff4d6;
  --warn-ink: #5c4300;
  --error: #a3261f;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(28 27 25 / .06), 0 8px 24px rgb(28 27 25 / .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step-0: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + .35vw, 1.3rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.1rem);
  --space: clamp(1rem, .8rem + 1vw, 1.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: var(--bg); padding: .5rem .8rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 1rem; }

.banner { background: var(--warn-bg); color: var(--warn-ink); text-align: center; padding: .6rem 1rem; font-size: .9rem; font-weight: 600; }

.top { position: sticky; top: 0; z-index: 5; background: rgb(246 243 238 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { font-weight: 750; font-size: var(--step-1); letter-spacing: -.01em; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.currency { min-height: 44px; padding: 0 .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.basket-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 1rem; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); cursor: pointer; }
.count { min-width: 1.4rem; height: 1.4rem; display: inline-grid; place-items: center; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: .8rem; font-weight: 700; padding: 0 .3rem; }
@media (max-width: 30rem) { .basket-btn span:not(.count) { display: none; } .currency { padding: 0 .5rem; } }

.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.hero h1 { font-size: var(--step-3); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 .6rem; max-width: 18ch; text-wrap: balance; }
.lede { color: var(--ink-2); font-size: var(--step-1); margin: 0 0 1.2rem; max-width: 46ch; }
.lede:empty { display: none; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.trust li { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .88rem; padding: .35rem .8rem; border-radius: 999px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: var(--space); padding-bottom: 4rem; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #ece7df; }
.card-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.card p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.price { font-weight: 750; font-size: 1.1rem; margin-top: auto; padding-top: .4rem; }
.add { min-height: 44px; border: 1.5px solid var(--ink); background: transparent; border-radius: var(--radius-sm); font-weight: 650; cursor: pointer; transition: background .15s, color .15s; }
.add:hover { background: var(--ink); color: var(--bg); }
.add.added { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.skeleton { background: linear-gradient(90deg, #ece7df, #f3efe8, #ece7df); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); aspect-ratio: .78; }
@keyframes shimmer { to { background-position: -200% 0; } }
.note { color: var(--ink-2); }

dialog.basket { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(100%, 26rem); border: 0; padding: 0; background: var(--surface); color: var(--ink); box-shadow: -12px 0 40px rgb(0 0 0 / .15); }
dialog.basket::backdrop { background: rgb(28 27 25 / .4); }
dialog.basket[open] { animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(100%); } }
.basket-inner { display: flex; flex-direction: column; height: 100%; }
.basket-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.basket-head h2 { margin: 0; font-size: var(--step-1); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 999px; cursor: pointer; }
.icon-btn:hover { background: var(--bg); }
.lines { list-style: none; margin: 0; padding: .5rem 1.25rem; overflow: auto; flex: 1; }
.line { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.line img { width: 4rem; height: 4rem; object-fit: cover; border-radius: 8px; background: #ece7df; }
.line-name { font-weight: 600; font-size: .95rem; margin: 0 0 .3rem; overflow-wrap: anywhere; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; border-radius: 999px; font-size: 1.1rem; }
.qty span { min-width: 1.6rem; text-align: center; font-weight: 600; }
.line-price { font-weight: 650; text-align: right; }
.remove { display: block; margin-top: .3rem; border: 0; background: none; color: var(--ink-2); text-decoration: underline; font-size: .82rem; cursor: pointer; padding: .25rem 0; }
.empty { padding: 1.5rem 1.25rem; color: var(--ink-2); margin: 0; }
.basket-foot { padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: .55rem; }
.row { display: flex; justify-content: space-between; font-size: 1.05rem; }
.small { font-size: .85rem; color: var(--ink-2); margin: 0; }
.center { text-align: center; }
.error { color: var(--error); font-weight: 600; font-size: .9rem; margin: 0; }
.error:empty { display: none; }
.primary { min-height: 52px; border: 0; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.primary:disabled { opacity: .55; cursor: not-allowed; }

.foot { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.brand-sm { font-weight: 750; margin: 0 0 .3rem; }
.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.links a { display: inline-block; padding: .35rem 0; color: var(--ink-2); }

.page { padding-block: 2.5rem 4rem; max-width: 46rem; }
.page h1 { font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.4rem); letter-spacing: -.02em; margin: 0 0 1.5rem; }
.page h2 { font-size: var(--step-1); margin: 2.2rem 0 .5rem; scroll-margin-top: 5rem; }
.page p, .page li { color: var(--ink-2); }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.5rem); }
.btn-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.3rem; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
