/* =====================================================
   css/site.css – עיצוב זמני ופונקציונלי (שלב 3).
   כל הצבעים והגופנים במשתנים בלבד, כדי שהחלפת העיצוב בשלב 6
   (זהה לאתר הישן) תהיה שינוי של בלוק :root בלבד.
   צבעים משוערים מתוך הסרטון של האתר הישן.
   ===================================================== */
:root {
  --c-brand: #E7888F;      /* לוגו */
  --c-primary: #B82C4C;    /* תפריט / כפתורים */
  --c-primary-dark: #94203b;
  --c-accent: #BC1C64;     /* עגלה */
  --c-bg: #fffaf7;
  --c-surface: #ffffff;
  --c-text: #2b2224;
  --c-muted: #7a6b6e;
  --c-line: #eadcd9;
  --c-error: #b00020;
  --c-ok: #1b7f4b;
  --c-soldout: #8a1c1c;
  --font-body: system-ui, -apple-system, "Segoe UI", Arial, "Noto Sans Hebrew", sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(80, 30, 40, .08);
  --maxw: 1100px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); background: var(--c-bg); color: var(--c-text); line-height: 1.5; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); margin: 0 0 .5em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* כותרת */
.top { background: var(--c-surface); border-bottom: 1px solid var(--c-line); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { font-family: var(--font-head); font-size: 1.5rem; color: var(--c-brand); font-weight: 700; text-decoration: none; margin-inline-end: auto; }
.brand small { display: block; font-size: .7rem; color: var(--c-muted); font-family: var(--font-body); font-weight: 400; }
.chip { background: none; border: 1px solid var(--c-line); border-radius: 999px; padding: 6px 14px; color: var(--c-primary); }
.chip:hover { border-color: var(--c-primary); }
.chip[aria-pressed="true"] { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.cart-btn { background: var(--c-accent); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; display: inline-flex; gap: 8px; align-items: center; }
.cart-btn .n { background: #fff; color: var(--c-accent); border-radius: 999px; min-width: 22px; text-align: center; font-weight: 700; font-size: .85rem; padding: 0 6px; }

/* קטגוריות */
.cats { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 0 4px; }
.cats .chip.sub { font-size: .9rem; padding: 4px 12px; }
.subcats { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 8px; }

/* כרטיסי עוגות */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; padding: 16px 0 40px; }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .ph { aspect-ratio: 1 / 1; background: #f4e9e6; display: flex; align-items: center; justify-content: center; color: var(--c-muted); font-size: 2.5rem; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs { display: flex; gap: 4px; padding: 6px 10px 0; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 6px; width: 38px; height: 38px; overflow: hidden; background: none; }
.thumbs button[aria-current="true"] { border-color: var(--c-primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1.1rem; margin: 0; }
.price { font-weight: 700; color: var(--c-primary); }
.soldout { color: var(--c-soldout); font-weight: 700; }
.card .spacer { flex: 1; }
.btn { background: var(--c-primary); color: #fff; border: 0; border-radius: var(--radius); padding: 10px 18px; font-weight: 600; }
.btn:hover { background: var(--c-primary-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: none; color: var(--c-primary); border: 1px solid var(--c-primary); }
.btn.block { width: 100%; }
.incart { font-size: .85rem; color: var(--c-ok); }

/* מגירת עגלה */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100%); background: var(--c-surface); z-index: 41; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
.drawer header h2 { margin: 0; }
.drawer .lines { flex: 1; overflow: auto; padding: 8px 16px; }
.drawer footer { border-top: 1px solid var(--c-line); padding: 14px 16px; display: grid; gap: 10px; }
.x { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--c-muted); }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--c-line); align-items: center; }
.line .nm { font-weight: 600; }
.qtybox { display: inline-flex; align-items: center; border: 1px solid var(--c-line); border-radius: 999px; }
.qtybox button { background: none; border: 0; width: 32px; height: 32px; font-size: 1.1rem; color: var(--c-primary); }
.qtybox span { min-width: 28px; text-align: center; }
.linkbtn { background: none; border: 0; color: var(--c-muted); text-decoration: underline; font-size: .85rem; padding: 0; }
.sumrow { display: flex; justify-content: space-between; gap: 10px; }
.sumrow.total { font-weight: 700; font-size: 1.1rem; }

/* חלון קופץ */
.modal { position: fixed; z-index: 60; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.45); }
.modal .box { background: var(--c-surface); border-radius: var(--radius); padding: 22px; max-width: 440px; width: 100%; box-shadow: var(--shadow); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* טופס */
.checkout { display: grid; gap: 24px; padding: 20px 0 50px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .checkout { grid-template-columns: 1fr 360px; align-items: start; } }
fieldset { border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); padding: 16px; margin: 0 0 16px; }
legend { font-family: var(--font-head); font-size: 1.15rem; padding: 0 8px; color: var(--c-primary); }
.row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label, .lbl { font-size: .9rem; color: var(--c-muted); }
.field .req { color: var(--c-error); }
.field input, .field select, .field textarea { border: 1px solid var(--c-line); border-radius: 8px; padding: 9px 10px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--c-brand); border-color: var(--c-brand); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--c-error); }
.err { color: var(--c-error); font-size: .85rem; min-height: 0; }
.hint { color: var(--c-muted); font-size: .85rem; }
.radios { display: flex; gap: 18px; flex-wrap: wrap; }
.radios label { display: inline-flex; gap: 6px; align-items: center; color: var(--c-text); font-size: 1rem; }
.side { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px; position: sticky; top: 80px; }
.side h2 { font-size: 1.2rem; }
.note { background: #fff3f4; border: 1px solid #f1cfd3; border-radius: 8px; padding: 8px 10px; font-size: .85rem; color: var(--c-muted); }
.banner { background: #fdecea; border: 1px solid #f5c2c0; color: var(--c-error); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.center { text-align: center; padding: 60px 16px; }
.done { max-width: 560px; margin: 40px auto; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 28px; text-align: center; }
.done .ok { color: var(--c-ok); font-size: 2.4rem; }
footer.site { text-align: center; color: var(--c-muted); padding: 24px 0 36px; font-size: .85rem; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--c-line); border-top-color: var(--c-primary); border-radius: 50%; animation: sp 0.8s linear infinite; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }
.field input[type="radio"], .field input[type="checkbox"], .radios input { width: auto; padding: 0; }
.field input[type="file"] { border: 1px dashed var(--c-line); background: #fff; }
