/* Hei Teves Seforim Sale: public site
   Smooth, solid, Apple-store calm: one family, soft surfaces, filled pills, frosted bars.
   The only warm color is the copper "40 Shana" emblem in the hero (public/brand/40-shana.png). */
:root {
  --white: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --divider: #d2d2d7;
  --black: linear-gradient(180deg, #082538 0%, #0e3d5c 100%); /* was black; now the navy from the school logo */
  --accent: #00797b;
  --accent-hover: #006466;
  --accent-soft: rgba(0, 121, 123, 0.1);
  --accent-on-dark: #4fd1d3;
  --deal: #b64400;
  --ok: #008009;
  --error: #c4291c;
  --fill: rgba(0, 0, 0, 0.06);
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --lift: 0 12px 32px rgba(0, 0, 0, 0.1);
  --r-card: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --he: "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: 16px;
  --max: 1280px;
  --nav-h: 104px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[lang="he"], .he { font-family: var(--he); letter-spacing: 0; }
a { color: var(--accent); }

.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 {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--white); color: var(--text); padding: 10px 16px; border-radius: 980px;
  box-shadow: var(--lift);
}
.skip:focus { top: 8px; }

.logo-plate { display: block; flex: none; width: 120px; }
.logo-plate img { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  border: 0; border-radius: 980px;
  font: 600 15px/1.2 var(--font); letter-spacing: -0.01em; text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: var(--fill); color: var(--text-2); cursor: not-allowed; }
.btn-ghost { background: var(--fill); color: var(--text); }
.btn-ghost:hover { background: rgba(0, 0, 0, 0.1); }
.btn-block { width: 100%; }
.btn-lg { min-height: 50px; padding: 0 28px; font-size: 17px; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; }
.linklike:hover { text-decoration: underline; }

/* ------------------------------------------------------------ global nav (frosted, pinned) */
.catbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.catbar-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo search cart" "chips chips chips";
  column-gap: 12px; align-items: center;
}
.catbar-inner.has-who { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "logo search search cart" "who chips chips chips"; }
.nav-home { grid-area: logo; display: flex; align-items: center; height: 52px; border-radius: 8px; }
.nav-logo { width: auto; }
.nav-logo img { height: 34px; width: auto; }
.search { grid-area: search; position: relative; display: block; }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  border: 0; border-radius: 12px;
  background: var(--fill); font-size: 16px; color: var(--text);
  -webkit-appearance: none; appearance: none;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.search input::placeholder { color: var(--text-2); }
.search input:focus { outline: none; background: var(--white); box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(0, 121, 123, 0.18); }
.cart-btn {
  grid-area: cart; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px 0 12px;
  background: var(--accent); color: var(--white);
  border: 0; border-radius: 980px;
  font: 600 14px/1 var(--font);
  transition: background-color 0.3s var(--ease);
}
.cart-btn svg { width: 18px; height: 18px; }
.cart-btn:hover { background: var(--accent-hover); }
.cart-count { min-width: 1ch; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-btn-label { display: none; }
.chips {
  grid-area: chips; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent);
}
.catbar-inner.has-who .chips { margin-left: 0; padding-left: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: 980px; background: var(--fill);
  color: var(--text); text-decoration: none; white-space: nowrap;
  font: 500 14px/1 var(--font);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.chip:hover { background: rgba(0, 0, 0, 0.1); }
.chip.is-active { background: var(--text); color: var(--white); }
.who-chip {
  grid-area: who; align-self: start; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  height: 36px; margin-top: 0; padding: 0 2px; max-width: 120px;
  background: none; border: 0; color: var(--text-2);
  font: 500 12px/1.2 var(--font); text-align: left;
}
.who-chip .who-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; }
.who-chip .who-change { color: var(--accent); }
.who-chip:hover .who-change { text-decoration: underline; }
html:has(.catbar-inner.has-who) { scroll-padding-top: calc(var(--nav-h) + 12px); }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(88vh - var(--nav-h)); min-height: calc(88svh - var(--nav-h));
  display: flex; align-items: center; justify-content: center;
  padding: 56px 20px 64px;
  background: var(--black); color: var(--white);
  text-align: center;
}
.hero-glow {
  position: absolute; left: 50%; top: 42%; width: min(900px, 140vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(233, 195, 107, 0.2), rgba(233, 195, 107, 0.07) 55%, rgba(233, 195, 107, 0) 100%);
  filter: blur(30px);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; width: 100%; max-width: 980px; display: flex; flex-direction: column; align-items: center; }
.hero-content > * { animation: rise 0.9s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: 0.06s; }
.hero-content > :nth-child(3) { animation-delay: 0.12s; }
.hero-content > :nth-child(4) { animation-delay: 0.24s; }
.hero-content > :nth-child(5) { animation-delay: 0.32s; }
.hero-content > :nth-child(6) { animation-delay: 0.38s; }
.hero-content > :nth-child(7) { animation-delay: 0.44s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-brand { margin: 0 auto 22px; }
.hero-brand .hero-logo { width: 104px; }
/* The "40 Shana" emblem (as on the pamphlet cover): no plate, no recolor. Width and height attributes
   reserve its box (720x760) before it loads; it is capped by the screen height so the buttons stay near. */
.hero-emblem {
  display: block; height: auto;
  width: clamp(200px, min(56vw, 36vh), 340px); width: clamp(200px, min(56vw, 36svh), 340px);
  margin: 0 auto 10px;
}
.hero-title { margin: 6px 0 0; max-width: 100%; font-size: 1rem; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.hero-title-lead { display: block; font-size: clamp(40px, 9vw, 72px); line-height: 1.05; color: var(--white); }
.hero-title-cont { display: block; font-size: clamp(32px, 7vw, 56px); line-height: 1.08; color: var(--text-3); }
.hero-he { margin: 22px 0 0; font: 500 clamp(21px, 5.4vw, 26px)/1.35 var(--he); color: var(--surface); }
.hero-he .he-part { display: block; }
.hero-he:empty { display: none; }
.hero-intro { max-width: 30em; margin: 16px auto 0; font-size: 17px; line-height: 1.42; color: var(--text-3); text-wrap: pretty; }
.hero-intro:empty { display: none; }
.hero-actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }
.hero-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-on-dark); font-size: 17px; text-decoration: none; }
.hero-link span { font-size: 1.25em; line-height: 1; transform: translateY(-1px); }
.hero-link:hover { text-decoration: underline; }
.hero :focus-visible, .gate :focus-visible { outline-color: var(--accent-on-dark); }

/* ------------------------------------------------------------ notices */
.notice { padding: 14px var(--gutter); text-align: center; font-size: 15px; background: var(--white); }
.notice-deadline { color: var(--accent); font-weight: 600; background: #e6f2f2; }
.notice-closed { color: var(--text); }
.notice-closed strong { display: block; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }

/* ------------------------------------------------------------ browse by category */
.browse { background: var(--white); padding: 56px var(--gutter) 60px; }
.browse-heading, .tiles { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.browse-heading { margin-top: 0; margin-bottom: 20px; font-size: clamp(28px, 5vw, 40px); font-weight: 700; letter-spacing: -0.028em; line-height: 1.1; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  min-height: 104px; padding: 16px 18px;
  background: var(--surface); border-radius: 18px;
  color: var(--text); text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.35s var(--ease);
}
.tile-name { font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.tile-he { font-size: 15px; font-weight: 500; color: var(--text-2); line-height: 1.3; text-align: left; }
.tile-count { margin-top: auto; font-size: 14px; color: var(--text-2); }
.tile.is-active { background: #ebebef; }
/* The Featured tile: the hero's navy, so it reads as the headline section. */
.tile.tile-featured { background: var(--black); color: var(--white); }
.tile.tile-featured .tile-he, .tile.tile-featured .tile-count { color: rgba(255, 255, 255, 0.72); }
.tile.tile-featured.is-active { background: var(--black); box-shadow: inset 0 0 0 2px var(--accent-on-dark); }

/* ------------------------------------------------------------ catalog */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 72px; outline: none; }
.loading { text-align: center; padding: 56px 0; color: var(--text-2); }
.cat-section { padding-top: 56px; }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 20px; margin-bottom: 18px; }
.cat-head h2 { margin: 0; outline: none; font-size: clamp(28px, 5vw, 44px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; }
.cat-head .cat-he { margin-left: auto; font: 500 clamp(20px, 3.6vw, 28px)/1.2 var(--he); color: var(--text-2); }
.cat-deals { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 22px; }
.cat-deal {
  display: inline-flex; align-items: center; min-height: 30px; padding: 4px 14px;
  border-radius: 980px; background: var(--accent-soft); color: var(--accent);
  font-size: 14px; font-weight: 600;
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--white); border-radius: var(--r-card);
  padding: 12px 14px 16px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.cover { position: relative; aspect-ratio: 1 / 1; margin: 0 -2px; }
.cover img { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; display: block; }
.card.is-soldout .cover img, .card.is-soldout .cover .ph { opacity: 0.4; }
.ph {
  position: absolute; inset: 6%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; text-align: center; overflow: hidden;
  background: var(--surface); border-radius: 14px;
  color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em;
}
.ph-he { font-weight: 500; color: var(--text-2); }
.ph-rule { display: none; }
.soldout-flag {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 6px 14px; border-radius: 980px;
  background: rgba(29, 29, 31, 0.82); color: var(--white);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.card-body { flex: 1; display: flex; flex-direction: column; gap: 3px; padding-top: 12px; }
.card-meta { display: flex; align-items: baseline; gap: 8px; min-height: 16px; }
.badge { font-size: 12px; font-weight: 600; color: var(--deal); }
.card-num { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.card-title {
  margin: 0; font-size: 17px; font-weight: 600; line-height: 1.24; letter-spacing: -0.02em; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-he { margin: 0; font: 400 15px/1.35 var(--he); color: var(--text-2); text-align: left; }
.card-note { margin: 2px 0 0; font-size: 14px; line-height: 1.35; color: var(--text-2); }
.deal-tag {
  align-self: flex-start; margin-top: 6px;
  padding: 3px 10px; border-radius: 980px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600; line-height: 1.4;
}
/* Free shipping: a filled navy pill on the card (the deal pill stays the soft teal one beside it). */
.card-tags { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 6px; }
.card-tags .deal-tag { margin-top: 0; }
.free-ship-tag {
  align-self: flex-start;
  padding: 3px 10px; border-radius: 980px;
  background: var(--black); color: var(--white);
  font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.free-ship-note { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.items-table .free-ship-note { display: block; margin-top: 2px; }
.totals dd.free { color: var(--accent); font-weight: 600; }
/* Coming after Hei Teves: a soft amber pill (calmer than, and distinct from, the navy and teal pills). */
.later-tag {
  align-self: flex-start;
  padding: 3px 10px; border-radius: 980px;
  background: #fbf0d9; color: #7a4f00;
  font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.later-note { display: inline-block; font-size: 12px; font-weight: 600; color: #8a5a00; white-space: nowrap; }
.items-table .later-note { display: block; margin-top: 2px; }
.later-line { margin: 12px 0 0; padding: 8px 12px; border-radius: 12px; background: #fbf0d9; color: #7a4f00; font-size: 13px; font-weight: 600; line-height: 1.4; }
.prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; padding-top: 8px; }
.price-sale, .price-plain { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.price-regular { color: var(--text-2); font-size: 14px; }
.price-save { color: var(--deal); font-size: 12px; font-weight: 600; flex-basis: 100%; }
.opt { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.opt label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.opt select, .opt input {
  width: 100%; height: 40px; padding: 0 30px 0 12px;
  border: 0; border-radius: 12px; background: var(--surface);
  font-size: 16px; color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.opt select {
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 14px no-repeat;
  text-overflow: ellipsis;
}
.opt input { padding-right: 12px; }
.opt select:focus, .opt input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px rgba(0, 121, 123, 0.18); }
.opt input::placeholder { color: var(--text-2); font-size: 15px; }
.opt .opt-err { color: var(--error); font-size: 12px; font-weight: 600; }
.opt .opt-err:empty { display: none; }
.card-actions { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.card-actions .btn { min-height: 40px; }
.in-cart { font-size: 12px; font-weight: 500; color: var(--ok); text-align: center; }

.stepper {
  display: flex; align-items: stretch; height: 40px;
  border-radius: 980px; background: var(--surface); overflow: hidden;
}
.stepper button {
  width: 44px; flex: none; border: 0; background: transparent; color: var(--accent);
  font: 500 22px/1 var(--font);
  transition: background-color 0.3s var(--ease);
}
.stepper button:hover { background: rgba(0, 121, 123, 0.1); }
.stepper button:focus-visible { outline-offset: -2px; border-radius: 980px; }
.stepper button:disabled { color: var(--text-3); background: transparent; cursor: not-allowed; }
.stepper output { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 28px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper-sm { height: 34px; }
.stepper-sm button { width: 36px; font-size: 19px; }
.stepper-sm output { font-size: 15px; }

.empty-search { text-align: center; padding: 64px 0; color: var(--text-2); }

/* ------------------------------------------------------------ footer */
.site-footer {
  background: var(--surface); color: var(--text-2);
  border-top: 1px solid var(--divider);
  text-align: center; font-size: 12px; line-height: 1.5;
  padding: 32px var(--gutter) calc(110px + env(safe-area-inset-bottom));
}
.site-footer p { max-width: 42em; margin: 0 auto 6px; }
.site-footer .linklike { font-size: 12px; }
.footer-logo { width: 64px; margin: 0 auto 14px; }

/* ------------------------------------------------------------ floating mobile order bar */
.cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 22px;
  background: rgba(0, 0, 0, 0.88); color: var(--white);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: 0; border-radius: 980px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  font: 600 16px/1 var(--font); text-align: left;
  animation: bar-in 0.4s var(--ease);
}
@keyframes bar-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.cart-bar-count { color: var(--text-3); font-weight: 500; }
.cart-bar-count::before { content: "·"; margin-right: 8px; }
.cart-bar-total { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ order sheet */
.scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade-in 0.35s var(--ease);
}
.drawer {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; top: 6vh; top: 6svh;
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: sheet-up 0.45s var(--ease);
}
.drawer::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 5px; margin-left: -18px;
  border-radius: 3px; background: var(--divider);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; gap: 6px; padding: 22px 16px 10px 20px; }
.drawer-head .icon-btn:first-child:not([hidden]) { margin-left: -10px; }
.drawer-title { flex: 1; margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; outline: none; }
.icon-btn {
  width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 50%; color: var(--accent);
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-round { width: 32px; height: 32px; background: var(--fill); color: var(--text-2); transition: background-color 0.3s var(--ease); }
.icon-round svg { width: 18px; height: 18px; }
.icon-round:hover { background: rgba(0, 0, 0, 0.1); }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px 24px; overscroll-behavior: contain; }
.drawer-foot {
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.drawer-foot:empty { display: none; }

.cart-empty { text-align: center; padding: 56px 10px; color: var(--text-2); }
.cart-empty p { margin: 0 0 18px; }
.who-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px;
  margin: 0 0 8px; padding: 10px 14px;
  background: var(--surface); border-radius: 12px;
  font-size: 14px;
}
.who-line .who-k { color: var(--text-2); }
.who-line strong { font-weight: 600; }
.who-line .linklike { font-size: 14px; margin-left: auto; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-areas: "thumb main price" "thumb ctrl ctrl";
  gap: 10px 14px; padding: 16px 0;
  border-bottom: 1px solid #e8e8ed;
}
.cart-line-thumb { grid-area: thumb; width: 56px; height: 56px; border-radius: 10px; background: var(--surface); overflow: hidden; display: block; }
.cart-line-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; }
.cart-line-main { grid-area: main; min-width: 0; }
.cart-line-main + div { grid-area: price; }
.cart-line-title { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.cart-line-title .n { color: var(--text-2); font-weight: 500; margin-right: 5px; }
.cart-line-he { font: 400 14px/1.35 var(--he); color: var(--text-2); display: block; text-align: left; margin-top: 1px; }
.cart-line-opt { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.cart-line-total { font-size: 15px; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-line-unit { font-size: 12px; color: var(--text-2); text-align: right; }
.cart-line-ctrl { grid-area: ctrl; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cart-line-ctrl .stepper { width: 116px; }
.remove-btn { background: none; border: 0; color: var(--accent); font-size: 14px; padding: 8px 2px; }
.remove-btn:hover { text-decoration: underline; }
.nudges { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nudge { padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; line-height: 1.35; }
.totals { margin: 18px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 0; font-size: 15px; align-items: baseline; }
.totals dt { color: var(--text-2); padding-right: 16px; }
.totals dd { margin: 0; text-align: right; white-space: nowrap; font-weight: 500; font-variant-numeric: tabular-nums; }
.totals .disc { color: var(--ok); }
.totals .grand { padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--divider); color: var(--text); }
.totals .grand { align-self: stretch; }
.totals dt.grand { display: flex; align-items: flex-end; padding-bottom: 3px; font-size: 17px; font-weight: 600; }
.totals dd.grand { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.note-included { font-size: 13px; color: var(--text-2); margin: 10px 0 0; }
.foot-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: 17px; font-weight: 600; }
.foot-total span:last-child { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.no-pay {
  position: relative; margin: 0; padding: 14px 16px 14px 48px;
  background: var(--surface); border-radius: 14px;
  font-size: 14px; color: var(--text-2); line-height: 1.4;
}
.no-pay::before {
  content: "i"; position: absolute; left: 16px; top: 15px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--white);
  font: 700 13px/20px Georgia, serif; text-align: center;
}
.no-pay strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 2px; }

/* checkout form */
.form { display: flex; flex-direction: column; gap: 20px; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 14px; padding: 0; }
.field .req { color: var(--deal); margin-left: 2px; }
.field .opt-tag { color: var(--text-2); font-weight: 400; margin-left: 4px; }
.field .help { font-size: 13px; color: var(--text-2); margin: -2px 0 2px; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px;
  border: 1px solid var(--divider); border-radius: 12px; background: var(--white); font-size: 17px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 40px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 14px no-repeat;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px rgba(0, 121, 123, 0.18); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field .err { color: var(--error); font-size: 13px; font-weight: 500; margin: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border-radius: 980px; align-self: flex-start; max-width: 100%; }
.radio {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 18px; border-radius: 980px;
  font-size: 15px; font-weight: 500; cursor: pointer; color: var(--text);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.radio:has(input:checked) { background: var(--white); font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.radio:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.summary { margin-top: 28px; padding: 18px 18px 20px; background: var(--surface); border-radius: 18px; }
.summary h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.summary-lines { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.summary-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.summary-lines li span:last-child { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary .totals .grand { border-color: var(--divider); }
.form-error { padding: 12px 14px; border-radius: 12px; background: #fdecea; color: var(--error); font-weight: 600; font-size: 14px; margin: 0; }

/* ------------------------------------------------------------ confirmation */
.receipt {
  position: fixed; inset: 0; z-index: 70; overflow-y: auto;
  background: var(--white); padding: 0 0 56px; outline: none;
}
.receipt-top { text-align: center; padding: calc(56px + env(safe-area-inset-top)) var(--gutter) 32px; }
.ok-mark { display: block; width: 72px; height: 72px; margin: 0 auto 20px; animation: pop 0.5s var(--ease) both; }
.ok-disc { fill: var(--accent); }
.ok-tick { fill: none; stroke: var(--white); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 0.55s var(--ease) 0.25s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.receipt-top h2 { margin: 0; font-size: clamp(36px, 8vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.receipt-top p { margin: 0; }
.receipt-top .receipt-num { margin: 6px 0 4px; font-size: clamp(44px, 12vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--accent); }
.receipt-top .receipt-type { font-size: 17px; font-weight: 600; color: var(--text); }
.receipt-top .receipt-when { margin-top: 4px; font-size: 15px; color: var(--text-2); }
.sheet { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 14px; }
.sheet-print-head { display: none; }
.panel { background: var(--surface); border-radius: 18px; padding: 22px 20px; }
.pay-box { text-align: center; }
.pay-box .due { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pay-box .due span:first-child { font-size: 15px; font-weight: 600; color: var(--text-2); }
.pay-box .due span:last-child { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pay-box p { margin: 10px auto 0; white-space: pre-line; font-size: 15px; color: var(--text-2); max-width: 32em; }
.sheet h3 { margin: 0 0 10px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.answers { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; margin: 0; font-size: 15px; }
.answers dt, .answers dd { padding: 9px 0; border-top: 1px solid var(--divider); }
.answers dt:first-of-type, .answers dt:first-of-type + dd { border-top: 0; }
.answers dt { color: var(--text-2); padding-right: 14px; }
.answers dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; white-space: pre-line; }
.items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.items-table th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 4px 4px 8px; }
.items-table td { padding: 10px 4px; border-top: 1px solid var(--divider); vertical-align: top; }
.items-table td:first-child { font-weight: 600; padding-left: 0; }
.items-table th:first-child { padding-left: 0; }
.items-table th:last-child, .items-table td:last-child { padding-right: 0; }
.items-table .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.items-table .he { display: block; color: var(--text-2); font-weight: 400; text-align: left; }
.items-table .optv { display: block; color: var(--text-2); font-weight: 400; font-size: 13px; }
.receipt-actions { max-width: 720px; margin: 24px auto 0; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; gap: 12px; }
.receipt-actions .btn { flex: 1 1 200px; }

/* ------------------------------------------------------------ entry gate */
.gate {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
  background: var(--black); color: var(--white);
  animation: fade-in 0.4s var(--ease);
}
.gate .hero-glow { position: fixed; top: 38%; }
.gate-inner { position: relative; width: 100%; max-width: 760px; margin: auto; text-align: center; }
.gate-logo { width: 96px; margin: 0 auto 18px; }
.gate-lockup { display: flex; flex-direction: column; align-items: center; }
.gate-title { font-size: 17px; font-weight: 600; color: var(--text-3); }
.gate-question { margin: 6px 0 0; outline: none; font-size: clamp(34px, 8vw, 56px); font-weight: 700; line-height: 1.07; letter-spacing: -0.03em; text-wrap: balance; }
.gate-intro { margin: 12px auto 0; max-width: 32em; font-size: 17px; color: var(--text-3); white-space: pre-line; }
.gate-intro:empty { display: none; }
.gate-choices { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 30px; text-align: left; }
.gate-choice {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  min-height: 96px; padding: 20px 22px;
  background: rgba(255, 255, 255, 0.08); color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 24px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  text-align: left;
  transition: background-color 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.gate-choice::after { content: "›"; grid-column: 2; grid-row: 1 / span 2; font-size: 30px; line-height: 1; color: var(--text-3); transform: translateY(-2px); }
.gate-choice-label { grid-column: 1; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.gate-choice-desc { grid-column: 1; margin-top: 3px; font-size: 15px; line-height: 1.35; color: var(--text-3); }
.gate-choice:hover, .gate-choice:focus-visible, .gate-choice.is-current { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.24); transform: scale(1.01); }
.gate-choice:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 3px; }
.gate-choice.is-current .gate-choice-label::after { content: " \2713"; color: var(--accent-on-dark); }
@media (min-width: 640px) {
  .gate-choices { grid-template-columns: 1fr 1fr; gap: 16px; }
  .gate-choice { min-height: 150px; padding: 26px 26px; align-content: center; }
  .gate-logo { width: 120px; }
}
@media (max-height: 620px) {
  .gate-logo { width: 76px; margin-bottom: 10px; }
  .gate-choices { margin-top: 20px; }
  .gate-choice { min-height: 80px; padding: 14px 18px; }
}

.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 80;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: rgba(29, 29, 31, 0.92); color: var(--white); padding: 12px 20px; border-radius: 980px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-weight: 500; font-size: 15px; max-width: calc(100vw - 32px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------ hover lift (pointer devices only) */
@media (hover: hover) and (pointer: fine) {
  .card:hover, .tile:hover { transform: translateY(-4px); box-shadow: var(--lift); }
}

/* ------------------------------------------------------------ larger screens */
@media (min-width: 680px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  :root { --r-card: 22px; }
  .card { padding: 16px 20px 20px; }
}
@media (min-width: 760px) {
  :root { --gutter: 32px; --nav-h: 96px; }
  .catbar-inner, .catbar-inner.has-who {
    grid-template-columns: auto minmax(220px, 380px) minmax(0, 1fr) auto auto;
    grid-template-areas: "logo search . who cart" "chips chips chips chips chips";
    column-gap: 18px;
  }
  .catbar-inner.has-who .chips { margin-left: calc(var(--gutter) * -1); padding-left: var(--gutter); }
  .who-chip { align-self: center; flex-direction: row; align-items: baseline; gap: 6px; margin: 0; height: auto; max-width: 260px; font-size: 13px; }
  .who-chip .who-change::before { content: "·"; margin-right: 6px; color: var(--text-2); }
  .cart-btn-label { display: inline; }
  .cart-bar { display: none; }
  .hero { padding: 40px 40px 60px; }
  .hero-brand .hero-logo { width: 84px; }
  .hero-brand { margin-bottom: 16px; }
  .hero-he { margin-top: 16px; font-size: 22px; }
  .hero-intro { font-size: 19px; max-width: 38em; }
  .browse { padding: 72px var(--gutter) 80px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .tile { min-height: 120px; padding: 20px 22px; }
  .cat-section { padding-top: 80px; }
  .site-footer { padding-bottom: 40px; }
  .toast { bottom: 28px; }
  .drawer {
    left: auto; top: 0; right: 0; bottom: 0; width: min(480px, 100vw);
    border-radius: 22px 0 0 22px;
    animation: sheet-in 0.45s var(--ease);
  }
  .drawer::before { display: none; }
  .drawer-head { padding: 22px 20px 10px 24px; }
  .drawer-body { padding: 6px 24px 24px; }
  .drawer-foot { padding: 16px 24px 20px; }
  .drawer.is-wide { width: min(560px, 100vw); }
  .panel { padding: 28px 32px; }
}
@keyframes sheet-in { from { transform: translateX(100%); } to { transform: none; } }
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
}
@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .card:hover, .tile:hover, .gate-choice:hover, .gate-choice:focus-visible, .gate-choice.is-current { transform: none !important; }
}

/* ------------------------------------------------------------ print (receipt only) */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; }
  body > *:not(.receipt) { display: none !important; }
  .receipt { position: static; overflow: visible; background: #fff; padding: 0; }
  .receipt-top, .receipt-actions { display: none !important; }
  .sheet { margin: 0; padding: 0; max-width: none; gap: 0; }
  .panel { background: #fff; border-radius: 0; padding: 0; margin-bottom: 14px; }
  .sheet-print-head { display: block; text-align: center; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #000; }
  .sheet-print-head .receipt-logo { width: 120px; margin: 0 auto 8px; }
  .sheet-print-head .t { font-weight: 700; font-size: 18px; }
  .sheet-print-head .n { font-weight: 700; font-size: 26px; margin-top: 4px; }
  .sheet-print-head .ty { font-weight: 600; font-size: 14px; margin: 2px 0; }
  .pay-box { text-align: left; border-bottom: 1px solid #000; padding-bottom: 10px; }
  .pay-box .due { flex-direction: row; justify-content: space-between; }
  .pay-box .due span:first-child, .pay-box .due span:last-child, .pay-box p { color: #000; font-size: 16px; }
  .sheet h3 { color: #000; font-size: 16px; }
  .answers dt, .answers dd, .items-table td, .items-table th { border-color: #999; color: #000; }
  .items-table .he, .items-table .optv { color: #333; }
  .free-ship-note, .totals dd.free, .later-note { color: #000; }
  .later-line { background: none; color: #000; padding: 0; border-radius: 0; font-weight: 700; }
  .totals dt, .totals dd, .totals .disc { color: #000; }
  .totals .grand { border-color: #000; }
  a { color: #000; }
}

/* Phones: the nav already shows the logo, so the hero does not repeat it. */
@media (max-width: 639px) { .hero .hero-brand { display: none; } }
/* Phones: a little tighter around the emblem so "Shop the sale" stays on the first screen. */
@media (max-width: 639px) {
  .hero { padding-top: 32px; padding-bottom: 52px; }
  .hero-emblem { margin-bottom: 4px; }
  .hero-he { margin-top: 16px; }
  .hero-intro { margin-top: 12px; }
  .hero-actions { margin-top: 20px; }
}
