/* ==========================================================================
   מחסני השוק | מבצעי ראש השנה 2026
   ========================================================================== */

@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/heebo-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/heebo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------- tokens */
:root {
  --page:         #275338;   /* campaign green – the artwork sits on this */
  --page-deep:    #1D3E2A;
  --tile-bg:      #29563B;   /* loading placeholder, a hair above the page */
  --gold:         #F0B429;
  --gold-soft:    #FFD97A;
  --ink:          #FFFFFF;
  --ink-soft:     rgba(255, 255, 255, .74);
  --line:         rgba(255, 255, 255, .15);
  --panel:        rgba(255, 255, 255, .055);

  --wrap:         1760px;
  --radius:       16px;
  --radius-sm:    10px;

  --shadow-sm: 0 1px 2px rgba(26,17,20,.06), 0 4px 12px rgba(26,17,20,.06);
  --shadow-md: 0 8px 30px rgba(26,17,20,.14);
  --shadow-lg: 0 24px 70px rgba(26,17,20,.28);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 50%; top: -100px; transform: translateX(50%);
  z-index: 200; background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: 0 0 10px 10px; font-weight: 600;
}
.skip-link:focus { top: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(14px, 4vw, 32px);
}

/* --------------------------------------------------------- share button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px;
  text-decoration: none; white-space: nowrap; flex: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn__icon { width: 19px; height: 19px; flex: none; }

.btn--wa { background: #25D366; color: #06331A; box-shadow: 0 2px 10px rgba(37,211,102,.35); }
.btn--wa:hover { background: #1EBE5A; box-shadow: 0 6px 20px rgba(37,211,102,.45); }

.btn--ghost {
  background: rgba(255,255,255,.12); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.btn--ghost:hover { background: rgba(255,255,255,.2); }

.btn--gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #4A2E00; box-shadow: 0 6px 22px rgba(240,180,41,.4);
}
.btn--gold:hover { box-shadow: 0 10px 30px rgba(240,180,41,.55); }

/* --------------------------------------------------------- grid */
.grid-section { background: var(--page); padding-block: 0 clamp(30px, 6vw, 56px); }

.section-head {
  padding-block: clamp(24px, 5vw, 44px) clamp(14px, 3vw, 22px);
  text-align: center;
}
.section-head__title {
  font-size: clamp(22px, 5.6vw, 34px); font-weight: 900; letter-spacing: -.03em;
}
.section-head__title::after {
  content: ''; display: block; width: 54px; height: 4px; border-radius: 99px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

/* full-bleed, zero-gap grid – column count is fixed per breakpoint so the tiles
   always divide the viewport exactly and never leave a seam. Keep in sync with
   the `sizes` attribute produced by scripts/build.mjs. */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  /* page colour, not tile colour: the last row is rarely full, and an empty
     trailing cell should disappear into the page instead of showing a stray block */
  background: var(--page);
  width: 100%;
}
@media (min-width: 640px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1440px) { .grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1800px) { .grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 2200px) { .grid { grid-template-columns: repeat(7, 1fr); } }

/* The cover spans two columns and two rows at every width, so it stays a perfect
   square and lines up exactly with the tiles around it. On phones (2 columns) that
   means it fills the full viewport width. */
.tile--cover {
  grid-column: span 2;
  grid-row: span 2;
}

/* Highlighted promos fill the width on phones only. Above the two-column
   breakpoint they go back to a single cell: a run of consecutive 2-wide tiles
   cannot fill an odd number of columns without leaving holes in the grid. */
@media (max-width: 639px) {
  .tile--wide {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--tile-bg);
  padding: 0;
  border: 0;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
/* shimmer placeholder – sits behind the image, no extra request */
.tile::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, transparent 20%, rgba(255,255,255,.11) 50%, transparent 80%),
    var(--tile-bg);
  background-size: 220% 100%, 100% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 220% 0, 0 0; }
  100% { background-position: -120% 0, 0 0; }
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* kills 1px sub-pixel seams between adjacent tiles */
  transform: scale(1.006);
  backface-visibility: hidden;
  transition: transform .4s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover img { transform: scale(1.055); }
  .tile::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.28), transparent 45%);
    opacity: 0;
    transition: opacity .3s var(--ease);
  }
  .tile:hover::after { opacity: 1; }
}
.tile.is-broken::before { animation: none; background: var(--tile-bg); }

/* --------------------------------------------------------- lightbox */
.lb {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: clamp(10px, 3vw, 28px);
  background: rgba(12, 4, 7, .93);
  overscroll-behavior: contain;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility 0s linear .25s;
}
@supports (backdrop-filter: blur(8px)) {
  .lb { backdrop-filter: blur(10px); }
}
.lb.is-open {
  opacity: 1; visibility: visible;
  transition: opacity .25s var(--ease), visibility 0s linear 0s;
}
.lb__figure {
  position: relative;
  /* source images top out at 725px — do not blow them up past that */
  max-width: min(94vw, 760px);
  max-height: 86vh;
  transform: scale(.94);
  transition: transform .28s var(--ease);
}
.lb.is-open .lb__figure { transform: scale(1); }
.lb__img {
  max-width: 100%; max-height: 86vh;
  width: auto; height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--tile-bg);
}
.lb__btn {
  position: absolute; z-index: 2;
  width: 46px; height: 46px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.lb__btn:hover { background: rgba(255,255,255,.28); }
.lb__btn:active { transform: scale(.92); }
.lb__btn svg { width: 22px; height: 22px; }
.lb__close { top: max(10px, env(safe-area-inset-top)); inset-inline-end: 12px; }
.lb__prev  { top: 50%; margin-top: -23px; inset-inline-start: 12px; }
.lb__next  { top: 50%; margin-top: -23px; inset-inline-end: 12px; }
@media (min-width: 900px) {
  .lb__prev { inset-inline-start: -66px; }
  .lb__next { inset-inline-end: -66px; }
}
.lb__count {
  position: absolute; bottom: -34px; inset-inline: 0;
  text-align: center; color: rgba(255,255,255,.72);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  direction: ltr;
}

/* --------------------------------------------------------- share band */
.share-band {
  background: var(--page-deep);
  color: #fff;
  text-align: center;
  padding-block: clamp(34px, 7vw, 60px);
}
.share-band__title {
  font-size: clamp(20px, 5vw, 30px); font-weight: 900; letter-spacing: -.03em;
  text-wrap: balance;
}
.share-band__sub {
  margin-top: 8px; color: var(--ink-soft); font-size: clamp(14px, 3.6vw, 17px);
  text-wrap: balance;
}
.share-band__actions {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}

/* --------------------------------------------------------- terms */
.terms {
  background: var(--page);
  padding-block: clamp(28px, 5vw, 48px);
}
.terms__head { text-align: center; margin-bottom: clamp(18px, 4vw, 28px); }
.terms__title { font-size: clamp(21px, 5vw, 30px); font-weight: 900; letter-spacing: -.03em; }
.terms__intro { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }
.terms__list { max-width: 860px; margin-inline: auto; }

.acc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: background-color .2s var(--ease);
}
.acc[open] { background: rgba(255, 255, 255, .08); }
.acc__q {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px;
  font-weight: 700; font-size: clamp(15px, 3.9vw, 17px);
  cursor: pointer;
  list-style: none;
  transition: background-color .18s var(--ease);
}
.acc__q::-webkit-details-marker { display: none; }
.acc__q:hover { background: rgba(255, 255, 255, .06); }
.acc__icon {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: var(--gold);
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.acc__icon svg { width: 14px; height: 14px; }
.acc[open] .acc__icon { transform: rotate(180deg); background: var(--gold); color: var(--page-deep); }
.acc__a {
  padding: 0 18px 18px;
  color: var(--ink-soft);
  font-size: clamp(14px, 3.7vw, 15.5px);
  line-height: 1.7;
}

/* one running paragraph of legal copy — long, so give it air and a sane measure */
.terms__text {
  max-width: 78ch;
  font-size: clamp(13px, 3.4vw, 14.5px);
  line-height: 1.85;
  color: var(--ink-soft);
}
.acc__a::before {
  content: ''; display: block; height: 1px; background: var(--line); margin-bottom: 14px;
}

/* --------------------------------------------------------- footer */
.footer {
  background: var(--page-deep);
  color: var(--ink-soft);
  padding-block: clamp(30px, 6vw, 48px);
  text-align: center;
}
.footer__logo { height: 38px; width: auto; margin-inline: auto; opacity: .95; }
.footer__brand { font-size: 20px; font-weight: 900; color: #fff; }
.footer__tagline {
  margin-top: 12px; color: var(--gold-soft); font-weight: 600;
  font-size: clamp(14px, 3.8vw, 17px);
}
.footer__links {
  margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.footer__links a { text-decoration: none; opacity: .82; transition: opacity .18s var(--ease); }
.footer__links a:hover { opacity: 1; text-decoration: underline; }
.footer__legal {
  margin-top: 22px; padding-top: 18px; font-size: 12.5px; opacity: .55;
  border-top: 1px solid rgba(255,255,255,.12);
}

/* --------------------------------------------------------- floating share */
/* WhatsApp green sits in the same hue family as the page, so the button needs a
   light ring to separate it from the background rather than colour alone. */
.fab {
  position: fixed;
  inset-inline-start: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #25D366;
  color: #06331A;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, .95),
    0 10px 28px rgba(0, 0, 0, .42);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.fab:hover {
  background: #1FC25C;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 1),
    0 14px 34px rgba(0, 0, 0, .5);
}
.fab:active { transform: scale(.95); }
.fab svg { width: 23px; height: 23px; flex: none; }

/* a few halo pulses on load to catch the eye, then it settles down for good */
.fab::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  animation: fab-pulse 2.6s ease-out 3;
}
@keyframes fab-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
  70%  { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* --------------------------------------------------------- toast */
.toast {
  position: fixed; z-index: 120;
  bottom: max(24px, env(safe-area-inset-bottom)); inset-inline: 0;
  margin-inline: auto; width: max-content; max-width: 90vw;
  background: var(--ink); color: #fff;
  padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
}
.toast.is-visible {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear 0s;
}

/* --------------------------------------------------------- motion / print */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
@media print {
  .fab, .share-band, .lb, .toast { display: none !important; }
}
