/* zoharceramic port — additive only, loaded after the site bundle */
:root { --zohar-page-bg: #F2EFE9; }

/* THE FONT. Her bundle writes every rule as `font-family: var(--font-heebo)`,
   but only ever DECLARES that variable on a Next.js-generated class that sits
   on the original's <body> (`heebo_…__variable`). Without the class the var is
   undefined, the whole declaration is invalid, and every page silently falls
   back to the system UI font — which is also why the hero heading measured
   taller than its clipping box and came out cropped. Declare it ourselves.

   The @font-face rules in her bundle resolve to `../media/…woff2`, i.e.
   /assets/media/ from where we host the stylesheet, so the publish step
   uploads the two woff2 files there as well as under /assets/site/. */
:root { --font-heebo: "Heebo", "Heebo Fallback", system-ui, sans-serif; }
body { background-color: var(--zohar-page-bg); color: var(--zohar-dark); font-family: var(--font-heebo); }

/* Top spacing under the fixed header. The site's purged bundle has no pt-28. */
.zp-pad { padding-top: 116px; }
@media (min-width: 768px) { .zp-pad { padding-top: 148px; } }

/* ── header: three states, all driven from here ───────────────────────────
   The capture bakes ONE state into the element's style attribute; loadShell
   strips it and stamps [data-zohar-header] instead, so these rules are the
   only thing that decides the bar's colour.
     home, at the top      → the dark bar the logo is designed to sit on
     inner page, at the top→ transparent over the page's own light background
     anywhere, scrolled    → the cream bar the live site uses               */
header[data-zohar-header] {
  background-color: transparent;
  backdrop-filter: none;
  border-bottom: 0;
  color: var(--zohar-dark);
  transition: background-color .3s ease, color .3s ease;
}
.zp-home header[data-zohar-header] {
  background-color: rgba(40, 37, 30, .94);
  backdrop-filter: blur(12px);
  border-bottom: .5px solid rgba(255, 255, 255, .08);
  color: #fff;
}
header[data-zohar-header][data-scrolled="1"] {
  background-color: rgba(249, 247, 242, .88);
  backdrop-filter: blur(12px);
  border-bottom: .5px solid rgba(45, 45, 45, .08);
  color: var(--zohar-dark);
}
/* The buttons carry their own inline `color`, so restate it at higher weight. */
header[data-zohar-header] button,
header[data-zohar-header] a[data-header-cart] { color: inherit !important; }

/* The logo ships as a WHITE signature. Tint it to match the bar underneath:
   white only on the dark home header, brand-dark everywhere else. */
header[data-zohar-header] [data-zohar-logo] {
  display: block;
  filter: brightness(0);
  transition: filter .3s ease;
}
.zp-home header[data-zohar-header] [data-zohar-logo] { filter: brightness(0) invert(1); }
.zp-home header[data-zohar-header][data-scrolled="1"] [data-zohar-logo] { filter: brightness(0); }

/* Dot-nav labels are revealed on hover on the original; without its runtime
   they would otherwise sit permanently across the page content. */
.dot-nav .dot-label {
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.dot-nav .dot-nav-item:hover .dot-label,
.dot-nav .dot-wrapper:focus-visible .dot-label { opacity: 1; }

/* The shop + cart dots are the only ones holding an ICON rather than being a
   plain bullet, and at the shared 24px they were completely covered by it.
   Give them a bigger disc so the white glyph sits inside with a real margin. */
.dot-nav .dot-shop,
.dot-nav [data-dot-id="cart"] {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: #2d2d2d; color: #fff;
}
.dot-nav .dot-shop svg,
.dot-nav [data-dot-id="cart"] svg { width: 20px; height: 20px; }
/* .dot:hover blanks the background; keep these two readable while hovered. */
.dot-nav .dot-shop:hover,
.dot-nav [data-dot-id="cart"]:hover { background: var(--zohar-brown); border-color: transparent; }

/* The signature logo asks for a 300px minimum. On a 390px phone that leaves
   nothing for the buttons, and everything after it is pushed off the left edge
   — on the live site the admin lock sits at x:-30 for exactly this reason.
   Give the logo a smaller floor on phones so the cart stays reachable. */
@media (max-width: 520px) {
  header[data-zohar-header] a[aria-label*="דף הבית"] > span {
    min-width: 170px !important;
    height: 54px !important;
  }
}

/* ── mobile drawer ────────────────────────────────────────────────────────
   Selector weight matters here: the panel is a plain `<aside>` and `[dir=rtl]`
   globals in the bundle can re-anchor a fixed element to the other side, which
   is how a closed drawer ends up sliding INTO view. Pin the side explicitly. */
[data-zohar-drawer][aria-hidden] {
  right: 0 !important; left: auto !important;
  transform: translateX(105%);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  flex-wrap: nowrap !important;
  overflow-y: auto;
}
[data-zohar-drawer][aria-hidden="false"] { transform: translateX(0); }
/* Above the cookie notice (z 999999) — otherwise the notice covers the lower
   half of an open menu on a phone. */
[data-zohar-drawer] { z-index: 1000001; }
[data-zohar-drawer-overlay] { z-index: 1000000; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
html.zohar-menu-open [data-zohar-drawer-overlay] { opacity: 1; pointer-events: auto; }
html.zohar-menu-open { overflow: hidden; }
/* The hamburger sits under the open panel otherwise. */
html.zohar-menu-open header[data-zohar-header] [data-zohar-toggle] { visibility: hidden; }

/* Her bundle ends with an UNLAYERED `a{color:inherit}`, and an unlayered rule
   beats everything in Tailwind's @layer utilities — so `text-white` has never
   applied to a single link on this site, and the black "לכל המוצרים בחנות"
   button reads dark-on-dark on the live site too. Same layer, more specific. */
a.text-white, a .text-white { color: #fff; }

/* The values band under the hero: the heading + line sat flush against the
   lower rule because only the TOP of the stack was spaced. Balance it. */
#values .grid > div > h3 { margin-top: 1.5rem; }
#values .grid > div > p { margin-bottom: 1.5rem; }

/* Catalogue heading + filter row */
.zp-title { font-size: 2.25rem; font-weight: 300; letter-spacing: .02em; margin-bottom: 1rem; }
@media (min-width: 768px) { .zp-title { font-size: 3rem; } }
.zp-filters { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2.5rem; }
.zp-filter {
  border: 1px solid rgba(40,37,30,.15); border-radius: 999px;
  padding: .5rem 1rem; font-size: .875rem; letter-spacing: .04em;
  color: var(--zohar-dark); transition: background-color .2s, color .2s;
}
.zp-filter:hover { background-color: var(--zohar-dark); color: #fff; }
.zp-count { margin-top: 2.5rem; font-size: .875rem; color: rgba(40,37,30,.6); }

/* PDP + transactional pages */
.zp-stack > * + * { margin-top: 1.25rem; }
.zp-field { width: 100%; border: 1px solid rgba(40,37,30,.2); border-radius: .5rem; padding: .5rem .75rem; background: #fff; }
.zp-btn {
  border-radius: .5rem; background: var(--zohar-brown); color: #fff;
  padding: .75rem 2rem; font-size: .875rem; font-weight: 500; transition: opacity .2s;
}
.zp-btn:hover { opacity: .9; }
.zp-btn[disabled] { opacity: .4; cursor: not-allowed; }

/* -- Catalogue product names ---------------------------------------------
   Her bundle sets html{font-size:18px}, so Tailwind text-sm lands at 15.75px
   and the names crowd the cards (three lines on /products). Asked to come down
   "a little": 15.75px -> 14px, one step rather than a redesign. Both surfaces
   are named explicitly - the shop card is ours (.zp-pname), the /products cards
   are hers and are reached through the page body class instead. */
.zp-pname { font-size: 0.7778rem; }
.zp-page-products main a[href^="/product/"] p { font-size: 0.7778rem; }

/* -- Rounded dropdowns for the shop filter + sort -------------------------
   The FIELDS were already rounded; what stayed square was the list a native
   <select> pops open - an OS-drawn menu with a blue highlight that no
   stylesheet can reach. So the list is rebuilt as real markup.

   The <select> stays in the DOM and stays the source of truth: the shop
   filtering reads select.value and listens for change, so none of that logic
   moves, and with JS off the native control is still there and still usable.
   The custom UI is attached only once the script runs, which is also why it
   can never change what a publish snapshot captures. */
.zp-select { position: relative; display: inline-block; }
.zp-select[data-zp-ready] > select {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.zp-select__btn {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid rgba(45,45,45,.12); border-radius: .85rem; background: #fff;
  padding: .625rem 1rem; font-size: .875rem; font-weight: 500;
  color: var(--zohar-dark); box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: border-color .2s, box-shadow .2s; cursor: pointer;
}
.zp-select__btn:hover { border-color: rgba(160,124,90,.35); }
.zp-select__btn:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(160,124,90,.25); }
.zp-select__label { flex: 1 1 auto; text-align: start; }
.zp-select__chev { width: .9em; height: .9em; flex: none; transition: transform .2s ease; opacity: .65; }
.zp-select[data-open="1"] .zp-select__chev { transform: rotate(180deg); }
.zp-select__list {
  position: absolute; z-index: 60; inset-inline-start: 0; top: calc(100% + .4rem);
  min-width: 100%; max-height: 16rem; overflow-y: auto; padding: .35rem;
  border: 1px solid rgba(45,45,45,.1); border-radius: .9rem; background: #fff;
  box-shadow: 0 14px 34px rgba(40,37,30,.18); list-style: none; margin: 0;
}
.zp-select__list[hidden] { display: none; }
.zp-select__opt {
  border-radius: .6rem; padding: .5rem .75rem; font-size: .875rem;
  color: var(--zohar-dark); cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.zp-select__opt:hover, .zp-select__opt[data-active="1"] { background: rgba(160,124,90,.12); }
.zp-select__opt[aria-selected="true"] { background: var(--zohar-dark); color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .zp-select__chev, .zp-select__opt { transition: none; }
}

/* ── home banner headline ─────────────────────────────────────────────────
   Her markup wraps the headline in <div class="w-full overflow-x-auto"> and
   pins it to one line with md:whitespace-nowrap. Those two together do not make
   a headline responsive — they make it SCROLLABLE: at lg the single line is
   1186px inside a 1128px column (the .container is capped at max-w-[1200px]),
   so the wrapper renders a horizontal scrollbar and the sentence is cut off.
   Measured: it overflows at 768, 820, 900, 1024, 1100, 1200, 1280, 1440, 1600 —
   every common desktop width except ~1000px, where it happens to fit.

   Fixed by making the type fit the column instead of letting the column scroll:

   · Phones keep their own size. Her <br class="md:hidden"> splits the sentence
     in two there, and Heebo (adopted site-wide in round 1) sets wider than her
     original face, so at her baked 2.44rem the first half no longer fit the
     303px column and wrapped to THREE lines — 165px tall, which pushed the
     banner past a 667px iPhone SE screen and made the banner itself scroll.
   · From md up the line is sized off the viewport. The sentence measures a
     constant ~16.9x its font size, and the column is 100vw minus gutters up to
     the 1200px cap, so min(5.1vw, 64px) clears it at every width with room to
     spare and stops growing once the container stops.
   · white-space is released back to normal as a SAFETY NET. If the ratio ever
     shifts — a font fails to load and a fallback with different metrics is
     used, or someone enlarges text via the accessibility addon — the headline
     wraps to a second line, which is what "responsive" should do. It must
     never go back to overflowing.
   · The wrapper's own overflow-x is neutralised at every width so a scrollbar
     cannot appear under the headline again. It sits inside the hero's
     overflow-hidden, so nothing can escape the section. */
main section .container > .overflow-x-auto {
  overflow-x: visible;
}
@media (max-width: 767px) {
  main section h1[class~="text-[2.44rem]"] {
    font-size: clamp(1.25rem, 7vw, 2.44rem);
  }
}
@media (min-width: 768px) {
  main section h1[class~="text-[2.44rem]"] {
    font-size: min(5.1vw, 64px);
    white-space: normal;
  }
}

/* ── purged-bundle repairs ────────────────────────────────────────────────
   Her stylesheet is Tailwind PURGED to the classes SHE used, so any arbitrary
   utility our build authored that her site never contained is simply absent —
   the class is on the element, no rule exists, and it fails silently. Probed
   every arbitrary class present in the served HTML against a synthetic element
   (site-work/a005252-work/r7-purge-sweep.ts) and pinned each one that turned
   up. Keyed on [class~=] attribute selectors, which need no escaping and
   already out-weigh a single utility class. */
[class~="text-[var(--zohar-dark)]"] { color: var(--zohar-dark); }
/* The "אזל מהמלאי" badge on a shop card: white text on a background that was
   never painted, i.e. white-on-photograph. */
[class~="bg-[var(--zohar-dark)]/85"] { background-color: rgba(40, 37, 30, .85); }

/* ── /cart and /checkout: the site's own column, not the whole screen ──────
   Same purge trap, and this one a buyer sees: the two sections were authored
   max-w-[760px] / max-w-[900px], neither of which exists in her bundle, so both
   pages ran edge to edge. At 1440 that put the form fields and the pay button
   under the fixed dot-nav rail on the left — the "parts hidden by the icons"
   report. Give them the container every other page uses (max-w-[1200px], which
   IS in the bundle: header, footer and the shop filter row all sit on it). */
main > section[aria-label="תשלום"],
main > section[aria-label="סל הקניות"] {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}
/* The dot-nav is FIXED to the left rail from 768px up and reaches x=72 (to
   1024) or x=92 (from 1100), while the 1200 container's own gutter is only
   (100vw - 1200)/2 — zero below 1200px. So on a laptop the container's left
   edge sits UNDER the rail. Keep these two pages clear of it at every width:
   start no closer than 100px to the screen edge, and fall back to the normal
   px-6 gutter once the container is wide enough to clear the rail by itself.
   inline-end, not left — the page is RTL, so the end side IS the left one. */
@media (min-width: 768px) {
  main > section[aria-label="תשלום"],
  main > section[aria-label="סל הקניות"] {
    padding-inline-end: max(1.5rem, calc(100px - max(0px, (100vw - 1200px) / 2)));
  }
}
/* Single-column markup (any page not yet rebuilt): don't stretch a text input
   across 1150px. Right-aligned so it shares the heading's edge. */
main > section[aria-label="תשלום"] > form:not(.zp-checkout-grid),
main > section[aria-label="תשלום"] > [data-checkout-empty],
main > section[aria-label="סל הקניות"] > [data-cart-body],
main > section[aria-label="סל הקניות"] > [data-cart-summary],
main > section[aria-label="סל הקניות"] > [data-cart-empty] {
  max-width: 780px;
  margin-inline-start: 0;
}
/* Two-column checkout: fields beside a summary card carrying the total and the
   pay button, so the site's width is used rather than merely permitted. */
.zp-checkout-grid { display: grid; gap: 1.75rem; align-items: start; }
@media (min-width: 1024px) {
  .zp-checkout-grid { grid-template-columns: minmax(0, 1fr) 21rem; }
  .zp-checkout-aside { position: sticky; top: 150px; }
}
.zp-checkout-aside {
  border: 1px solid rgba(40, 37, 30, .12);
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem 1.25rem 1.4rem;
  box-shadow: 0 1px 3px rgba(40, 37, 30, .06);
}

/* ── the banner has to fit ONE screen — the cookie notice is part of it ────
   The headline rules above stop the sentence being CUT SIDEWAYS. This is the
   other half of the same complaint, and it is why two earlier rounds "fixed"
   the banner and it stayed broken: the hero is centred on the FULL viewport,
   while the consent bar added in round 1 is fixed to the bottom and takes
   204-230px of a 568-740px phone. Measured on 7 device profiles
   (site-work/a005252-work/r7-fold.ts): her signature was cut by 38-141px and
   the slide dots by 168-195px on first load — for every visitor who has not
   yet pressed "אני מסכים". A viewport-only test never sees it.

   --zp-cookie-h is published by the runtime while the notice is up and drops
   to 0 on dismissal, so the banner re-centres on the whole screen afterwards
   instead of sitting permanently high. Nothing here touches desktop or tablet. */
@media (max-width: 767px) {
  #home > .container {
    min-height: 0 !important;
    padding-top: 5.5rem !important;
    padding-bottom: calc(1.25rem + var(--zp-cookie-h, 0px)) !important;
    gap: 1rem !important;
  }
  /* Her signature is a 460x333 graphic in a fixed 288px-tall box. Drive it off
     the width and let the ratio set the height — object-contain was already
     letterboxing up to 80px of empty space inside that box. */
  #home span[class~="h-[288px]"] {
    height: auto !important;
    width: min(58vw, 250px) !important;
    max-width: min(58vw, 250px) !important;
    aspect-ratio: 460 / 333;
  }
  /* The slide dots ride above the notice rather than behind it. */
  #home > [class~="bottom-8"] {
    bottom: calc(1rem + var(--zp-cookie-h, 0px)) !important;
  }
  /* The notice itself: 230px of a 568px screen is 40% of the phone. Same
     wording, same colours, same buttons — tighter type and padding only. */
  [data-zohar-cookie] { padding: .7rem .9rem calc(.7rem + env(safe-area-inset-bottom, 0px)) !important; }
  [data-zohar-cookie] > div { gap: .6rem !important; }
  [data-zohar-cookie] p { font-size: .75rem !important; line-height: 1.45 !important; }
  [data-zohar-cookie] a[href="/privacy"]:not(.font-medium),
  [data-zohar-cookie] button { padding: .5rem .9rem !important; font-size: .78rem !important; }
  [data-zohar-cookie] > div > div { gap: .5rem !important; }
}
