:root {
  color-scheme: dark;
  --bg: #090909;
  --bg-elevated: #101010;
  --panel: #151515;
  --panel-hover: #202020;
  --line: #373737;
  --text: #fafafa;
  --muted: #b6b6b6;
  --accent: #abd18d;
  --accent-hover: #c6e4b0;
  --accent-soft: rgb(171 209 141 / 12%);
  accent-color: var(--accent);
  --ease-tea: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.37, 0, 0.63, 1);
  font: 16px/1.52 "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.28s var(--ease-tea), border-color 0.28s var(--ease-tea), opacity 0.28s var(--ease-tea);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select {
  touch-action: manipulation;
}

button {
  color: inherit;
  cursor: pointer;
  transition:
    color 0.26s var(--ease-tea),
    background-color 0.26s var(--ease-tea),
    border-color 0.26s var(--ease-tea),
    transform 0.26s var(--ease-tea),
    box-shadow 0.32s var(--ease-tea);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

button,
select,
input {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 7px;
}

input,
select {
  color: var(--text);
  padding: 0.72rem 0.85rem;
  min-width: 0;
  transition: border-color 0.24s var(--ease-tea), background-color 0.24s var(--ease-tea), box-shadow 0.24s var(--ease-tea);
}

input:hover,
select:hover {
  border-color: #656565;
}

a:hover,
button:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* Header & Navigation */
header {
  position: absolute;
  z-index: 20;
  top: 0;
  width: 100%;
  padding: 20px 4.2%;
  display: flex;
  align-items: center;
  gap: 3vw;
  transition: background-color 0.4s var(--ease-tea), border-color 0.4s var(--ease-tea), backdrop-filter 0.4s var(--ease-tea);
}

body:not(.home) > header {
  position: sticky;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(64, 64, 64, 0.55);
}

body.home > header.is-scrolled {
  position: fixed;
  background: rgba(10, 10, 10, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(64, 64, 64, 0.45);
}

header nav {
  display: flex;
  gap: 2.6vw;
  margin-left: auto;
}

header nav a {
  position: relative;
  padding: 0.65rem 0;
  color: var(--text);
  letter-spacing: 0.015em;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.35rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.36s var(--ease-tea);
}

header nav a:hover::after,
header nav a:focus-visible::after {
  transform: scaleX(1);
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 750;
  font-size: clamp(1.1rem, 2vw, 1.65rem);
  color: var(--accent);
  letter-spacing: 0.03em;
}

.brand img {
  width: 2.1em;
  height: auto;
  margin-right: 0.45em;
  filter: grayscale(0.3);
  transition: transform 0.5s var(--ease-tea), filter 0.4s var(--ease-tea);
}

.brand:hover img {
  transform: rotate(-6deg) scale(1.04);
  filter: grayscale(0);
}

.brand span {
  opacity: 0.82;
}

#basket {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 8px 12px;
}

#basket:hover {
  border-color: rgba(171, 209, 141, 0.38);
  background: rgba(171, 209, 141, 0.07);
}

#basket svg {
  width: 24px;
  transition: transform 0.32s var(--ease-tea);
}

#basket:hover svg {
  transform: translateY(-1px);
}

#count {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  min-width: 1.35em;
  height: 1.35em;
  display: inline-grid;
  place-items: center;
  border-radius: 99px;
  background: rgba(171, 209, 141, 0.16);
  color: var(--accent-hover);
  padding: 0 0.35em;
}

#basket.is-pulsing {
  animation: basket-pulse 0.6s var(--ease-tea);
}

@keyframes basket-pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); background: rgba(171, 209, 141, 0.22); border-color: var(--accent); }
  100% { transform: scale(1); }
}

/* Typography & Shared Elements */
.hero {
  min-height: clamp(650px, 56.25vw, 930px);
  background: var(--bg) url(/assets/hero-tea.jpg) center top / cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 0 4.2% clamp(36px, 4vw, 74px);
}

.hero h1,
h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 4.6vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(3.2rem, 4.7vw, 5.5rem);
  line-height: 0.99;
  letter-spacing: -0.035em;
  max-width: 70vw;
}

.hero h1 i {
  font-weight: 400;
  color: var(--text);
}

.home .hero h1 i {
  white-space: nowrap;
}

.hero p {
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.35rem);
  margin: 1.1rem 0;
}

h2 {
  font-size: clamp(2.15rem, 4vw, 4.2rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  margin-bottom: 0.85rem;
}

.section {
  padding: clamp(52px, 6.2vw, 98px) max(4.2%, calc((100vw - 1500px) / 2));
}

.crumbs {
  padding: 1.15rem 4.2% 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs li + li::before {
  content: "›";
  margin-right: 0.5rem;
  color: var(--muted);
  opacity: 0.75;
}

.crumbs a:hover {
  color: var(--accent);
}

/* Chips, Buttons, Actions */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chips button,
.tag {
  padding: 0.32rem 0.9rem;
  border-radius: 99px;
  font-size: 0.9rem;
}

.chips button {
  min-height: 37px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.chips button.active {
  color: var(--bg);
  border-color: var(--accent);
  background: var(--accent);
}

.chips a,
.pages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #565656;
  border-radius: 99px;
  padding: 0.35rem 0.92rem;
  color: var(--text);
  min-height: 37px;
  transition: all 0.28s var(--ease-tea);
}

.chips a[aria-current],
.pages a[aria-current] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.chips a:hover,
.pages a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.chips a[aria-current]:hover,
.pages a[aria-current]:hover {
  color: var(--bg);
}

.action,
.outline,
.solid {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.72rem 1.35rem;
  border: 1px solid #626262;
  border-radius: 6px;
  color: var(--text);
  background: rgba(171, 209, 141, 0.04);
  transition:
    color 0.28s var(--ease-tea),
    border-color 0.28s var(--ease-tea),
    background-color 0.28s var(--ease-tea),
    transform 0.28s var(--ease-tea),
    box-shadow 0.35s var(--ease-tea);
}

.action:hover,
.outline:hover {
  border-color: var(--accent-hover);
  color: var(--text);
  background: rgba(171, 209, 141, 0.11);
  transform: translateY(-1px);
}

.action:active,
.outline:active,
.solid:active {
  transform: translateY(0) scale(0.985);
}

.action {
  margin-top: 1.35rem;
}

.action span {
  font-size: 1.2rem;
  transition: transform 0.28s var(--ease-tea);
}

.action:hover span {
  transform: translateX(3px);
}

.solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 550;
}

.solid:hover {
  color: var(--bg);
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Cards & Grids */
.filters {
  margin: 1.6rem 0;
}

.tools {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 1.5rem 0;
}

.search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding-left: 0.8rem;
  gap: 0.3rem;
}

.search span {
  font-size: 1.35rem;
}

.search input {
  border: 0;
  width: 100%;
  background: transparent;
}

.tools select {
  max-width: 42%;
}

.tools input[type="search"] {
  width: min(100%, 26rem);
}

#results {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.88rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
  transition:
    transform 0.42s var(--ease-tea),
    border-color 0.36s var(--ease-tea),
    box-shadow 0.42s var(--ease-tea),
    background-color 0.36s var(--ease-tea);
}


.card:hover {
  transform: translateY(-4px);
  border-color: #565656;
}


.imagebtn {
  display: block;
  padding: 0;
  border: 0;
  overflow: hidden;
  width: 100%;
  border-radius: 7px;
  background: var(--panel);
}

.imagebtn img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.65;
  object-fit: cover;
  transition: transform 0.65s var(--ease-tea), filter 0.45s var(--ease-tea);
}

.card:hover .imagebtn img,
.imagebtn:hover img {
  transform: scale(1.048);
}

.cardbody {
  padding: 15px 12px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tag {
  align-self: flex-start;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  background: rgba(171, 209, 141, 0.12);
  border: 1px solid rgba(171, 209, 141, 0.22);
  color: var(--accent);
}

.titlebtn {
  font: 400 clamp(1.2rem, 1.6vw, 1.68rem) / 1.2 Georgia, serif;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  margin: 0.7rem 0 0.35rem;
}

.titlebtn a {
  transition: color 0.25s var(--ease-tea);
}

.summary {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 1rem;
}

.cardfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.small {
  border-radius: 24px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
}

.price {
  font-variant-numeric: tabular-nums;
}

.price small {
  color: var(--muted);
  font-size: 0.8rem;
}

#more {
  display: flex;
  margin: 2rem auto 0;
}

/* Reading, Categories, States & Editorial Pages */
.reading {
  background: var(--panel);
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
}

#articles button,
#service-links button {
  display: block;
  text-align: left;
  width: 100%;
  padding: 0.75rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

#articles button {
  display: flex;
  justify-content: space-between;
}

#articles button::after {
  content: "↗";
  color: var(--muted);
}

.category-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px 22px;
  margin: 1.5rem 0;
}

.category-links a,
.departments a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0.72rem 0.15rem;
  transition: color 0.28s var(--ease-tea), border-color 0.28s var(--ease-tea), padding-left 0.28s var(--ease-tea);
}

.category-links a::after {
  content: "→";
  font-size: 0.95em;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.28s var(--ease-tea), transform 0.28s var(--ease-tea);
}

.category-links a:hover {
  padding-left: 0.35rem;
  border-color: rgba(171, 209, 141, 0.55);
}

.category-links a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.intro,
.guide {
  color: var(--muted);
  max-width: 66ch;
  line-height: 1.62;
}

.guide a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.departments,
.pages {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 1.2rem 0;
}

.filter-title {
  font: 500 1rem / 1.5 Arial, sans-serif;
  letter-spacing: 0;
  margin: 1.25rem 0 0.5rem;
  color: var(--muted);
}

.pages {
  gap: 0.5rem;
  margin-top: 2rem;
}

.listing,
.checkout {
  padding-top: clamp(26px, 3.5vw, 54px);
}

.checkout {
  max-width: 880px;
  margin: auto;
  min-height: 55vh;
}

.checkout h1 {
  margin-bottom: 1.25rem;
}

.product-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 4vw;
  margin-bottom: 3rem;
}

.product-lead > * {
  min-width: 0;
}

.product-lead .gallery {
  margin: 0;
}

.product-lead h1 {
  font-size: clamp(2rem, 3.2vw, 3.7rem);
  overflow-wrap: anywhere;
  margin: 0.7rem 0;
}

.product-lead .gallery img {
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

.product-page .copy,
.story .copy {
  max-width: 72ch;
  line-height: 1.72;
  font-size: 1.04rem;
}

.story h1 {
  margin-bottom: 1.4rem;
}

.story .copy + .copy {
  margin-top: 1.15rem;
}

.variants select {
  max-width: 100%;
}

/* State Grid (Tea by State) */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  gap: 18px;
  margin: 2.2rem 0;
}

.state-grid article {
  position: relative;
  padding: 1.65rem 1.55rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform 0.38s var(--ease-tea),
    border-color 0.35s var(--ease-tea),
    box-shadow 0.42s var(--ease-tea);
}


.state-grid article:hover {
  transform: translateY(-3px);
  border-color: #626262;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48);
}


.state-grid h2 {
  font-size: 1.75rem;
  line-height: 1.18;
}

.state-grid h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.state-grid p {
  color: var(--muted);
  margin: 0.65rem 0 0;
  font-size: 0.94rem;
}

/* Tea Reviews & Editorial Pages */
.editorial-hero {
  max-width: 72ch;
}

.editorial-hero h1 {
  margin-bottom: 1rem;
}

.editorial-note {
  margin-top: 2rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  background: var(--panel);
  max-width: 58ch;
}

.editorial-note p {
  margin: 0;
  color: #d3d3d3;
  line-height: 1.6;
}

/* Footer */
footer.section {
  position: relative;
  border-top: 1px solid rgba(64, 64, 64, 0.6);
  background: var(--bg);
}


.footgrid {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
}

.footgrid h3 {
  font-size: 1.45rem;
  color: var(--text);
  margin-bottom: 0.55rem;
}

.footgrid p,
.footgrid a,
footer button {
  color: var(--muted);
}

.footgrid a:hover {
  color: var(--accent);
}

.payment-note,
.footgrid small {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0;
}

.payment-note {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

#articles a,
#service-links a {
  display: block;
  border-bottom: 1px solid var(--line);
  padding: 0.68rem 0;
  transition: color 0.25s var(--ease-tea), padding-left 0.28s var(--ease-tea), border-color 0.28s var(--ease-tea);
}

#articles a:hover,
#service-links a:hover {
  padding-left: 0.35rem;
  border-color: rgba(171, 209, 141, 0.45);
}

/* Dialogs, Forms, Cart Helpers & Toast */
dialog {
  width: min(690px, 94vw);
  max-height: 90dvh;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  padding: clamp(22px, 4vw, 46px);
  border-radius: 14px;
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: #000c;
  backdrop-filter: blur(5px);
}

.close {
  float: right;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.gallery {
  display: flex;
  overflow: auto;
  gap: 8px;
  scroll-snap-type: x mandatory;
  margin: 1rem 0;
}

.gallery img {
  width: 85%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 8px;
  scroll-snap-align: start;
}

.copy {
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: #d4d4d4;
}

.variants {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1rem;
}

dialog h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  padding-right: 25px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.9rem;
}

#order-form {
  display: grid;
  gap: 14px;
}

.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check {
  display: flex;
  align-items: start;
  gap: 8px;
}

.check a {
  text-decoration: underline;
}

.promo {
  display: flex;
  gap: 10px;
  align-items: end;
}

.promo label {
  flex: 1;
}

#shipping {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.line {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.line small {
  display: block;
  color: var(--muted);
}

.qty {
  display: flex;
  gap: 6px;
  align-items: center;
}

.qty button {
  min-width: 34px;
  height: 36px;
}

.line + .line {
  margin-top: 0;
}

.line-name {
  flex: 1;
}

.line-photo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.detail-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#cart-lines {
  margin: 1rem 0;
}

#totals {
  font-size: 1.25rem;
}

.muted {
  color: var(--muted);
}

#toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  z-index: 40;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: none;
}

.empty {
  color: var(--muted);
  grid-column: 1 / -1;
}

/* Progressive Scroll Reveal */
.tl-motion [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.72s var(--ease-tea) var(--reveal-delay, 0ms),
    transform 0.72s var(--ease-tea) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.tl-motion [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* Responsive Breakpoints */
@media (max-width: 850px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    background-position: 57% top;
  }
  .reading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .product-lead {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    max-width: 95vw;
  }
  .product-lead .gallery img {
    max-height: 320px;
  }
  .tools input[type="search"] {
    width: 65%;
  }
  .crumbs {
    padding-inline: 5%;
  }
}

@media (max-width: 600px) {
  header {
    padding: 14px 5%;
    gap: 8px;
  }
  .brand img {
    width: 34px;
  }
  header nav {
    gap: 10px;
  }
  header nav a {
    font-size: 0.84rem;
  }
  
  #basket {
    padding: 6px 8px;
  }
  .hero {
    min-height: 0;
    background: var(--bg) url(/assets/hero-tea-mobile.jpg) center top / 100% auto no-repeat;
    padding: 83vw 5% 36px;
  }
  .hero h1 {
    font-size: clamp(2.6rem, 10vw, 3.6rem);
  }
  .hero p {
    margin: 0.85rem 0;
  }
  .chips {
    gap: 6px;
  }
  .chips button {
    font-size: 0.85rem;
    padding: 0.38rem 0.76rem;
  }
  .section {
    padding: 42px 5%;
  }
  .grid {
    gap: 12px;
  }
  .card {
    padding: 5px;
  }
  .cardbody {
    padding: 10px 6px 6px;
  }
  .titlebtn {
    font-size: 1.15rem;
  }
  .tag {
    font-size: 0.7rem;
    padding: 0.22rem 0.55rem;
  }
  .cardfoot {
    align-items: start;
    flex-direction: column;
  }
  .summary {
    font-size: 0.8rem;
  }
  .small {
    font-size: 0.77rem;
  }
  .tools {
    flex-wrap: wrap;
  }
  .search {
    flex: 1;
    min-width: 120px;
  }
  .tools select {
    font-size: 0.85rem;
  }
  .tools #results {
    width: 100%;
  }
  .footgrid {
    grid-template-columns: 1fr;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .promo {
    flex-wrap: wrap;
  }
  .line {
    flex-wrap: wrap;
  }
}

@media (max-width: 380px) {
  body > header {
    padding-inline: 12px;
    gap: 6px;
  }
  .brand {
    font-size: 1rem;
    letter-spacing: 0;
  }
  .brand img {
    width: 27px;
    margin-right: 5px;
  }
  header nav {
    gap: 8px;
  }
  header nav a {
    font-size: 0.78rem;
  }
  #basket {
    gap: 3px;
    padding: 6px 4px;
  }
  #basket svg {
    width: 23px;
  }
}

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

@media (max-width: 420px) {
  body > header {padding-inline: 12px; gap: 6px}
  .brand {font-size: 1rem}
  .brand img {width: 28px; margin-right: 5px}
  #basket {padding-inline: 3px; gap: 2px}
}
@media (max-width: 350px) {
  .brand span {display: none}
}

.mobile-menu {display: none}
@media (max-width: 760px) {
  .desktop-nav {display: none}
  body > header {gap: 8px; padding-block: 10px}
  #basket {margin-left: auto; min-height: 44px; justify-content: center}
  .mobile-menu {display: block; color: var(--text)}
  .mobile-menu summary {
    display: grid; place-items: center; width: 44px; height: 44px;
    list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 50%;
    background: var(--bg-elevated);
  }
  .mobile-menu summary::-webkit-details-marker {display: none}
  .mobile-menu summary svg {width: 22px; height: 22px}
  .mobile-menu[open] summary {color: var(--accent); border-color: var(--accent)}
  .mobile-menu[open] .bar-top {transform: translateY(6px) rotate(45deg); transform-origin: 12px 6px}
  .mobile-menu[open] .bar-mid {opacity: 0}
  .mobile-menu[open] .bar-bottom {transform: translateY(-6px) rotate(-45deg); transform-origin: 12px 18px}
  .mobile-menu nav {
    position: absolute; top: 100%; inset-inline: 0; display: grid; gap: 0; margin: 0;
    padding: 2px max(5%, 16px) 12px; background: var(--bg-elevated);
    border-block: 1px solid var(--line); box-shadow: 0 12px 18px #0005;
  }
  .mobile-menu nav a {padding: 13px 4px; font-size: 1rem; color: var(--text)}
  .mobile-menu nav a + a {border-top: 1px solid var(--line)}
  .mobile-menu nav a::after {display: none}
  .mobile-menu nav a:hover,.mobile-menu nav a:focus-visible {color: var(--accent)}
  body > header:has(.mobile-menu[open]) {background: var(--bg-elevated)}
}
