/* Storefront styles: brand palette (cream, navy, terracotta, mustard, olive), Hebrew-first, works RTL and LTR via logical properties.
 * Contrast (WCAG AA, 4.5:1 for text): navy on cream 12.9, on white 14.0. Text on terracotta/mustard/olive fills is
 * navy (4.6 / 6.7 / 5.2): white text on them is too faint (3.1 / 2.1 / 2.7). Terracotta and olive used as *text*
 * on cream/white use the darker -dark shades (5.1 / 5.4). */
:root {
  /* Brand colors */
  --cream: #faf5e8;
  --navy: #182c4b;
  --terracotta: #d97a54;
  --terracotta-dark: #a84e2c;  /* links / accent text on cream or white */
  --mustard: #e5a93b;
  --olive: #96a365;
  --olive-dark: #5c6b2e;       /* positive-status / label text on cream or white */
  /* Roles */
  --sand: var(--cream);        /* page background */
  --paper: #ffffff;            /* cards, header, footer */
  --ink: var(--navy);          /* headings + body text */
  --on-accent: var(--navy);    /* text on terracotta / mustard / olive fills */
  --muted: #4e5a6e;            /* secondary text (navy-grey, 6.4:1 on cream) */
  --line: #e8dfc8;
  --sun: var(--mustard);
  --sky: #2e4a73;              /* info notices / waitlist (navy family) */
  --terracotta-tint: #fbede6;
  --mustard-tint: #fcf1da;
  --olive-tint: #eef0e2;
  --olive-tint-line: #d5dbba;
  --navy-tint: #e8edf4;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(24, 44, 75, 0.08);
  font-family: 'Rubik', 'Assistant', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--sand);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--sand); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--terracotta-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
.wrap { max-width: 1100px; margin-inline: auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Header / footer */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.15rem; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--navy); color: var(--cream); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; }
.brand-en { color: var(--muted); font-size: 0.9rem; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.lang-toggle { border: 2px solid var(--ink); background: transparent; border-radius: 999px; padding: 6px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.lang-toggle:hover { background: var(--ink); color: var(--cream); }
.site-footer { margin-top: 64px; padding-block: 32px; border-top: 1px solid var(--line); background: var(--paper); font-size: 0.95rem; }
.site-footer p { margin: 4px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--terracotta-dark); text-decoration: underline; }

/* Bilingual static pages: both languages are server-rendered; show the active one (html[lang] is set by common.js). */
html[lang="he"] [data-lang="en"], html[lang="en"] [data-lang="he"] { display: none; }
.policy { max-width: 760px; margin: 32px auto 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px clamp(20px, 5vw, 44px); }
.policy h1 { font-size: 2rem; margin-bottom: 0.2em; }
.policy h2 { font-size: 1.25rem; margin-top: 1.6em; }
.policy ul { padding-inline-start: 1.2em; }
.policy li { margin-bottom: 0.5em; }

/* Trust badges under the checkout button */
.trust-row { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; color: var(--muted); font-size: 0.85rem; }
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--olive); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn { display: inline-block; border: 0; border-radius: 999px; padding: 14px 26px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--terracotta); color: var(--on-accent); transition: background 0.15s, color 0.15s; }
.btn:hover { background: var(--navy); color: var(--cream); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { background: var(--line); }
.btn-block { width: 100%; text-align: center; font-size: 1.1rem; }

/* Hero */
.hero { padding-block: 64px 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.kicker { color: var(--olive-dark); font-weight: 600; letter-spacing: 0.02em; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-art { background: var(--paper); border-radius: 28px; box-shadow: var(--shadow); padding: 18px; }

/* Pillars */
.section { padding-block: 40px; }
.section h2 { font-size: 1.8rem; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.pillar { background: var(--paper); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.pillar h3 { font-size: 1.1rem; }
.pillar p { margin: 0; color: var(--muted); }
.story { max-width: 760px; margin-inline: auto; background: var(--paper); border: 1px solid var(--line); border-inline-start: 6px solid var(--terracotta); border-radius: var(--radius); padding: 32px clamp(20px, 5vw, 44px); box-shadow: var(--shadow); }
.story p { margin: 0 0 1em; line-height: 1.85; }
.story .story-lead { font-size: 1.1rem; }
.story .story-mission { margin: 1.4em 0 0; padding-top: 1.1em; border-top: 1px dashed var(--line); font-weight: 600; color: var(--terracotta-dark); }
.pillar .dot { width: 12px; height: 12px; border-radius: 50%; margin-bottom: 12px; }

/* Catalog */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.card-img { aspect-ratio: 4 / 3; background: var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card.soon .card-img img { filter: saturate(0.55); opacity: 0.85; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1.15rem; margin: 0; }
.card .alt-name { color: var(--muted); font-size: 0.9rem; margin-top: -4px; }
.card .price { font-weight: 700; font-size: 1.2rem; }
.card .actions { margin-top: auto; padding-top: 8px; }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; background: var(--olive); color: var(--on-accent); }
.badge.soon { background: var(--mustard); color: var(--on-accent); }
.badge.oos { background: #8a2a1a; color: #fff; }
.badge.promo { background: var(--terracotta); color: var(--on-accent); inset-inline-start: auto; inset-inline-end: 12px; }
.price-was { color: var(--muted); font-weight: 400; font-size: 0.9em; }
.price-now.sale { color: var(--terracotta-dark); }
.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; }
.announcement { background: var(--navy); color: var(--cream); text-align: center; padding: 8px 16px; font-weight: 500; font-size: 0.95rem; }
.card.oos .card-img img { filter: grayscale(0.6); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.tag { font-size: 0.8rem; background: var(--sand); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.tag.age { background: var(--olive-tint); border-color: var(--olive-tint-line); }

/* Product page */
.back { display: inline-block; margin-block: 24px 8px; text-decoration: none; }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-media { background: var(--paper); border-radius: 28px; padding: 18px; box-shadow: var(--shadow); position: sticky; top: 88px; }
.product h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 4px; }
.product .alt-name { color: var(--muted); margin-top: 0; }
.product .lead { font-size: 1.1rem; }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-block: 18px; }
.box h2 { font-size: 1.2rem; }
.box ul { margin: 0; padding-inline-start: 1.2em; }
.safety { border: 2px solid var(--mustard); background: var(--mustard-tint); }
.safety h2::before { content: '⚠︎ '; }

.order-form .field { margin-bottom: 18px; }
.order-form label.title { display: block; font-weight: 600; margin-bottom: 6px; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--sand); }
.stepper input { width: 48px; text-align: center; border: 0; font: inherit; font-size: 1.1rem; font-weight: 600; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.addon-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.addon-row p { margin: 2px 0 0; font-size: 0.92rem; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; margin-bottom: 8px; cursor: pointer; background: var(--paper); }
.radio-card:has(input:checked) { border-color: var(--terracotta); background: var(--terracotta-tint); }
.radio-card input { margin-top: 6px; accent-color: var(--terracotta); }
.radio-card .rc-main { flex: 1; }
.radio-card .rc-price { font-weight: 600; white-space: nowrap; }
.radio-card p { margin: 0; font-size: 0.9rem; }
.summary { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 8px; }
.summary div { display: flex; justify-content: space-between; padding-block: 2px; }
.summary .grand { font-weight: 700; font-size: 1.25rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.notice { padding: 12px 16px; border-radius: 12px; margin-block: 12px; font-size: 0.95rem; }
.notice.demo { background: var(--navy-tint); color: var(--sky); border: 1px solid #c9d3e2; }
.notice.warn { background: #fdecea; color: #8a2a1a; border: 1px solid #f3c4bb; }
.error { color: #b3261e; font-weight: 600; min-height: 1.4em; }

/* Forms (mock checkout) */
.form-grid { display: grid; gap: 12px; }
.form-grid input, .form-grid textarea { width: 100%; padding: 12px; border: 2px solid var(--line); border-radius: 12px; font: inherit; background: var(--paper); }
.narrow { max-width: 620px; margin-inline: auto; }

@media (max-width: 820px) {
  .hero, .product { grid-template-columns: 1fr; }
  .hero { padding-block: 36px 24px; }
  .product-media { position: static; }
  .nav { gap: 12px; }
}

/* Catalog filters + featured card + waitlist */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px 22px; }
.chip { border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 500; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--terracotta); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.chip .count { opacity: 0.6; font-size: 0.85em; }
.cat-label { color: var(--olive-dark); font-size: 0.85rem; font-weight: 600; }
.card h3 a { color: inherit; text-decoration: none; }
.card.featured { grid-column: span 2; flex-direction: row; border: 3px solid var(--terracotta); }
.card.featured .card-img { flex: 1.1; aspect-ratio: auto; min-height: 280px; }
.card.featured .card-body { flex: 1; padding: 26px; }
.card.featured h3 { font-size: 1.5rem; }
.waitlist { border: 2px solid var(--sky); background: var(--navy-tint); }
.notice.ok { background: var(--olive-tint); color: var(--olive-dark); border: 1px solid var(--olive-tint-line); }
@media (max-width: 600px) {
  .card.featured { grid-column: auto; flex-direction: column; }
  .card.featured .card-img { min-height: 0; aspect-ratio: 4 / 3; }
}
