/* ==========================================================
   VERA ATELIER — modern clothing store (light & calm)
   ========================================================== */
:root {
  --paper: #fdfcfa;
  --paper-2: #f6f3ee;
  --paper-3: #efeae2;
  --ink: #16151a;
  --ink-2: #3c3a44;
  --muted: #77737f;
  --line: #e8e3db;
  --clay: #b4674d;
  --clay-dark: #97543d;
  --sage: #7f8b7c;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(30, 24, 18, 0.1);
  --font: "Inter", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container { width: min(1220px, 92%); margin-inline: auto; }
.container--narrow { width: min(820px, 92%); }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.3rem; }
p { color: var(--ink-2); }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 16px;
}
.lead { font-size: clamp(1rem, 1.5vw, 1.14rem); color: var(--muted); max-width: 56ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: 500 0.9rem/1 var(--font);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 0.22s ease;
}
.btn:hover { background: var(--clay); border-color: var(--clay); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--sm { padding: 11px 22px; font-size: 0.82rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: 0.2s;
}
.link-arrow:hover { color: var(--clay); border-color: var(--clay); gap: 14px; }

/* ---------- announcement ---------- */
.topbar {
  background: var(--ink);
  color: #f3efe9;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 16px;
}
.topbar span { color: #d9b8a8; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(253, 252, 250, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 30px; height: 76px; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: 0.04em; }
.brand small {
  font-size: 0.58rem; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--muted); margin-top: 5px;
}
.nav__links { display: flex; gap: 30px; margin-left: auto; }
.nav__links a {
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: 0.2s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--clay); border-color: var(--clay); }

.nav__tools { display: flex; align-items: center; gap: 14px; }
.bag-btn {
  position: relative;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
}
.bag-btn:hover { border-color: var(--ink); }
.bag-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px; height: 20px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  font-size: 0.7rem;
}
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

/* ---------- hero ---------- */
.hero { padding: clamp(50px, 7vw, 96px) 0 clamp(40px, 5vw, 70px); overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.hero h1 em { font-style: italic; color: var(--clay); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__stats {
  display: flex;
  gap: clamp(20px, 4vw, 46px);
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  list-style: none;
}
.hero__stats b { display: block; font-family: var(--display); font-size: 1.7rem; font-weight: 500; }
.hero__stats span { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.hero__art { position: relative; }
.hero__art figure {
  border-radius: 220px 220px 18px 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper-2);
}
.hero__art img { width: 100%; height: clamp(400px, 55vw, 620px); object-fit: cover; }
.hero__chip {
  position: absolute;
  left: -26px;
  bottom: 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  max-width: 230px;
}
.hero__chip small {
  display: block; font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--clay); margin-bottom: 5px;
}
.hero__chip b { font-family: var(--display); font-size: 1.05rem; font-weight: 500; display: block; }
.hero__chip span { font-size: 0.8rem; color: var(--muted); }

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
  padding: 15px 0;
}
.marquee__track {
  display: flex;
  gap: 46px;
  width: max-content;
  animation: slide 32s linear infinite;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.marquee__track span::before { content: "✦"; margin-right: 46px; color: var(--clay); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 8vw, 116px) 0; }
.section--tint { background: var(--paper-2); }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 54px);
  flex-wrap: wrap;
}
.section__head p { color: var(--muted); margin-top: 10px; max-width: 52ch; }
.section__head--center { flex-direction: column; align-items: center; text-align: center; }
.section__head--center p { margin-inline: auto; }

/* ---------- category cards ---------- */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cat {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-3);
  aspect-ratio: 3 / 4;
  display: block;
}
.cat img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.cat:hover img { transform: scale(1.07); }
.cat__label {
  position: absolute;
  inset: auto 16px 16px;
  background: rgba(253, 252, 250, 0.94);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cat__label b { font-family: var(--display); font-size: 1.14rem; font-weight: 500; }
.cat__label span { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cat__label i {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; font-style: normal; font-size: 0.9rem;
  transition: 0.25s;
}
.cat:hover .cat__label i { background: var(--clay); transform: translateX(3px); }

/* ---------- products ---------- */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.product { position: relative; }
.product__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-3);
  aspect-ratio: 3 / 4;
  margin-bottom: 16px;
}
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.product:hover .product__media img { transform: scale(1.05); }
.product__badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--paper);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.product__badge.sale { background: var(--clay); color: #fff; }
.product__add {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  padding: 13px;
  border: 0; border-radius: 12px;
  background: rgba(22, 21, 26, 0.94);
  color: #fff;
  font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  opacity: 0; transform: translateY(12px);
  transition: 0.28s ease;
}
.product:hover .product__add { opacity: 1; transform: none; }
.product__add:hover { background: var(--clay); }
.product__cat { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.product__name { font-family: var(--display); font-size: 1.08rem; font-weight: 500; margin: 5px 0 7px; }
.product__price { font-size: 0.95rem; font-weight: 600; }
.product__price s { color: var(--muted); font-weight: 400; margin-left: 8px; }

/* ---------- editorial split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.split__media { border-radius: var(--radius); overflow: hidden; background: var(--paper-3); }
.split__media img { width: 100%; height: clamp(320px, 42vw, 540px); object-fit: cover; }
.split--reverse .split__text { order: 2; }
.split h2 { margin-bottom: 18px; }
.split p + p { margin-top: 14px; }
.split .btn, .split .link-arrow { margin-top: 26px; }

/* ---------- values ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.value {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: 0.25s;
}
.value:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.value i {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--paper-2); font-style: normal; font-size: 1.2rem;
  margin-bottom: 16px;
}
.value h3 { font-size: 1.02rem; margin-bottom: 7px; }
.value p { font-size: 0.88rem; color: var(--muted); }

/* ---------- quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.quote p { font-family: var(--display); font-size: 1.05rem; line-height: 1.6; color: var(--ink); font-style: italic; }
.quote footer { margin-top: 18px; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.quote .stars { color: var(--clay); letter-spacing: 3px; margin-bottom: 14px; }

/* ---------- newsletter ---------- */
.news {
  background: var(--ink);
  color: #f6f2ec;
  border-radius: 26px;
  padding: clamp(38px, 6vw, 68px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: center;
}
.news h2 { color: #fff; }
.news p { color: #b3aebe; margin-top: 12px; }
.news__form { display: flex; gap: 10px; }
.news__form input {
  flex: 1;
  padding: 15px 20px;
  border-radius: 999px;
  border: 1px solid #3a3844;
  background: #1e1d25;
  color: #fff;
  font: 400 0.9rem var(--font);
}
.news__form input::placeholder { color: #8b8797; }
.news__form input:focus { outline: none; border-color: var(--clay); }
.news__form .btn { background: #f6f2ec; color: var(--ink); border-color: #f6f2ec; }
.news__form .btn:hover { background: var(--clay); border-color: var(--clay); color: #fff; }
.news small { display: block; margin-top: 12px; color: #8b8797; font-size: 0.76rem; }

/* ---------- tighter rhythm on the categories (shop) page ---------- */
.shop .section { padding: clamp(36px, 4.6vw, 66px) 0; }
.shop .page-head { padding: clamp(40px, 5.5vw, 70px) 0 clamp(14px, 2vw, 24px); }
.shop .section__head { margin-bottom: clamp(22px, 3vw, 38px); }
.shop #all { padding-top: clamp(26px, 3.4vw, 46px); }
.shop .split__media img { height: clamp(300px, 36vw, 470px); }
.shop .split h2 { margin-bottom: 14px; }
.shop .split .btn, .shop .split .link-arrow { margin-top: 20px; }

/* ---------- category chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 6px;
  margin-bottom: clamp(14px, 2.4vw, 26px);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font: 500 0.8rem/1 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
}
.chip span { font-size: 0.72rem; color: var(--muted); }
.chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active span { color: #b7b2c0; }

[hidden] { display: none !important; }
#productGrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cat-empty {
  text-align: center;
  color: var(--muted);
  padding: 46px 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- page head (inner pages) ---------- */
.page-head { padding: clamp(48px, 7vw, 92px) 0 clamp(28px, 4vw, 46px); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.page-head .crumbs { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.page-head .crumbs a:hover { color: var(--clay); }

/* ---------- about / prose ---------- */
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 44px 0 14px; }
.prose p { margin-bottom: 16px; }
.prose ul { padding-left: 22px; color: var(--ink-2); }
.prose li { margin-bottom: 9px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 40px 0; }
.stat {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
}
.stat b { display: block; font-family: var(--display); font-size: 2.2rem; font-weight: 500; color: var(--clay); }
.stat span { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.gallery figure { border-radius: var(--radius); overflow: hidden; background: var(--paper-3); }
.gallery img { width: 100%; height: 300px; object-fit: cover; transition: transform 0.6s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { padding: 14px 4px 0; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 38px); }
.field { display: block; margin-bottom: 18px; }
.field span {
  display: block; font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font: 400 0.93rem var(--font);
  color: var(--ink);
  transition: border-color 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--clay); }
.contact-info { display: grid; gap: 18px; }
.contact-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.contact-card i {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: var(--paper-2); display: grid; place-items: center; font-style: normal;
}
.contact-card b { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.contact-card p { font-size: 0.88rem; color: var(--muted); }
.contact-photo { border-radius: var(--radius); overflow: hidden; margin-top: 4px; }
.contact-photo img { width: 100%; height: 320px; object-fit: cover; }

/* ---------- footer ---------- */
.footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 76px) 0 30px; margin-top: clamp(50px, 7vw, 90px); }
.footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; padding-bottom: 36px; }
.footer__grid p { font-size: 0.9rem; color: var(--muted); margin-top: 16px; max-width: 34ch; }
.footer h4 { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 11px; }
.footer ul a { font-size: 0.9rem; color: var(--muted); transition: 0.2s; }
.footer ul a:hover { color: var(--clay); }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--muted);
}

/* ---------- bag drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__bg { position: absolute; inset: 0; background: rgba(22, 21, 26, 0.45); opacity: 0; transition: 0.3s; }
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92%);
  background: var(--paper);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.3, 0.8, 0.3, 1);
  display: flex; flex-direction: column;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 26px; border-bottom: 1px solid var(--line);
}
.drawer__head b { font-family: var(--display); font-size: 1.3rem; font-weight: 500; }
.drawer__close { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); line-height: 1; }
.drawer__items { flex: 1; overflow-y: auto; padding: 20px 26px; display: grid; gap: 16px; align-content: start; }
.drawer__empty { color: var(--muted); font-size: 0.92rem; text-align: center; padding: 40px 0; }
.bag-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.bag-item img { width: 64px; height: 74px; object-fit: cover; border-radius: 9px; }
.bag-item b { font-size: 0.92rem; font-weight: 600; display: block; }
.bag-item span { font-size: 0.82rem; color: var(--muted); }
.bag-item .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.bag-item .rm:hover { color: var(--clay); }
.drawer__foot { padding: 22px 26px; border-top: 1px solid var(--line); background: #fff; }
.drawer__total { display: flex; justify-content: space-between; margin-bottom: 16px; font-weight: 600; }
.drawer__total span:last-child { font-family: var(--display); font-size: 1.25rem; }
.drawer__note { font-size: 0.76rem; color: var(--muted); margin-top: 12px; text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 80px);
  background: var(--ink); color: #fff;
  padding: 13px 26px; border-radius: 999px;
  font-size: 0.88rem; z-index: 120; opacity: 0;
  transition: 0.3s ease; pointer-events: none;
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- bottom tab bar (phones only) ---------- */
.tabbar { display: none; }

/* ---------- reveal ----------
   Content is visible by default; it is only hidden while JS is active
   (.has-js), so a script failure can never leave the page blank. */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.has-js .reveal { opacity: 0; transform: translateY(26px); }
.has-js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .has-js .reveal { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  #productGrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
@media (max-width: 1024px) {
  .products { grid-template-columns: repeat(2, 1fr); }
  .values, .stats-row { grid-template-columns: repeat(2, 1fr); }
  .quotes, .gallery { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .shop .section { padding: clamp(34px, 5vw, 56px) 0; }
  .split__media img { height: clamp(280px, 40vw, 420px); }
}
@media (max-width: 900px) {
  .hero__grid, .split, .contact-grid, .news { grid-template-columns: 1fr; }
  .split--reverse .split__text { order: 0; }
  .hero__chip { left: 16px; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .shop .split__media img { height: clamp(240px, 46vw, 360px); }
}
@media (max-width: 760px) {
  .nav__links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav__links.is-open { max-height: 320px; }
  .nav__links a { padding: 16px 6%; border-top: 1px solid var(--line); }
  .nav__toggle { display: block; }
  .nav__tools { margin-left: auto; }
  .products, .values, .stats-row, .gallery, .footer__grid { grid-template-columns: repeat(2, 1fr); }
  #productGrid { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .quotes { grid-template-columns: 1fr; }
  .products { gap: 16px; }
  .values, .stats-row { gap: 14px; }
  .product__add { opacity: 1; transform: none; }
  .news__form { flex-direction: column; }

  /* tighter rhythm on phones */
  .section { padding: clamp(40px, 9vw, 56px) 0; }
  .hero { padding: clamp(34px, 9vw, 54px) 0 clamp(26px, 7vw, 40px); }
  .split__media img { height: clamp(200px, 54vw, 300px); }
  .marquee { padding: 12px 0; }
  .footer { margin-top: clamp(30px, 8vw, 50px); padding-top: clamp(34px, 8vw, 46px); }
  .footer__grid { gap: 26px 20px; padding-bottom: 26px; }

  /* fixed app-style tab bar */
  body { padding-bottom: 64px; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: rgba(253, 252, 250, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 50px;
    text-decoration: none;
    color: var(--ink-2);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
  }
  .tabbar a i { font-style: normal; font-size: 1.05rem; line-height: 1; color: var(--muted); transition: 0.2s; }
  .tabbar a.is-active, .tabbar a.is-active i { color: var(--clay); }

  /* categories page on phones */
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* -5% overshot: a percentage margin resolves against the 92% container,
       so the row stuck out 1.9px on each side. 4/92 = 4.3478% lands exactly on the screen edge. */
    margin-inline: -4.3478%;
    padding-inline: 4.3478%;
    padding-bottom: 8px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; padding: 10px 18px; }
  .shop .section { padding: clamp(28px, 7vw, 44px) 0; }
  .shop .page-head { padding: clamp(30px, 8vw, 46px) 0 clamp(12px, 3vw, 18px); }
  .shop #all { padding-top: clamp(22px, 6vw, 34px); }
  .split__media img { height: clamp(220px, 56vw, 320px); }
  .split { gap: 22px; }
  .section__head { margin-bottom: clamp(20px, 5vw, 30px); }
  .footer { margin-top: clamp(34px, 8vw, 56px); }
}
@media (max-width: 520px) {
  .page-head h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .cat__label { inset: auto 10px 10px; padding: 11px 13px; }
  .cat__label b { font-size: 0.98rem; }
  .cat__label span { font-size: 0.64rem; }
  .cat__label i { width: 30px; height: 30px; font-size: 0.8rem; }
  .product__name { font-size: 1rem; }
  .product__cat { font-size: 0.66rem; }
  .product__price { font-size: 0.94rem; }
  .product__add { padding: 10px 14px; font-size: 0.78rem; }
  .products, .cats { gap: 12px; }
  .hero__grid { gap: 26px; }
  .section__head h2, .split h2 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .topbar { font-size: 0.66rem; padding: 7px 4%; }
}
@media (max-width: 340px) {
  .products, .cats, #productGrid { grid-template-columns: 1fr; }
}
