/* עגלה, קופה ואישור הזמנה. נטען בכל העמודים שבהם יש עגלה */

/* ---------- תג עגלה בכותרת ---------- */
.cart-btn { position: relative; }
.cart-badge { position: absolute; top: -2px; inset-inline-start: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d9d27a; color: #111; font-size: 13px; font-weight: 800; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.cart-badge[hidden] { display: none; }
body.no-scroll { overflow: hidden; }

/* ---------- מגירת עגלה ---------- */
.drawer-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .2s; }
.drawer-overlay.is-open { opacity: 1; }
.drawer { position: fixed; z-index: 100; top: 0; bottom: 0; left: 0; width: min(440px, 100%); background: var(--paper); color: var(--ink); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 6px 0 30px rgba(0,0,0,.3); }
.drawer.is-open { transform: translateX(0); }
.drawer[hidden], .drawer-overlay[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #e0e0dd; }
.drawer-head h2 { margin: 0; font-size: 26px; font-weight: 800; }
.drawer-close { width: 44px; height: 44px; border: 0; background: var(--mist); border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink); }
.drawer-close:hover { background: var(--ash); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; min-height: 0; }
.drawer-list { list-style: none; margin: 0; padding: 0; }
.drawer-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid #ececea; }
.drawer-item.is-out .drawer-thumb, .drawer-item.is-out .drawer-name { opacity: .5; }
.drawer-thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--mist); overflow: hidden; display: grid; place-items: center; }
.drawer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drawer-thumb img.ph { width: 70%; height: auto; object-fit: contain; }
.drawer-info { display: grid; gap: 6px; min-width: 0; justify-items: start; }
.drawer-name { font-weight: 800; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.drawer-unit { font-size: 14px; color: #555; }
.drawer-warn { font-size: 14px; font-weight: 700; color: var(--wine); }
.drawer-side { display: grid; gap: 10px; justify-items: end; align-content: space-between; align-self: stretch; }
.drawer-line { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.drawer-remove { border: 0; background: none; font: inherit; font-size: 14px; color: var(--wine); text-decoration: underline; cursor: pointer; padding: 6px 2px; min-height: 32px; }
.stepper--sm button { width: 38px; height: 38px; font-size: 20px; }
.stepper--sm .qty-val { min-width: 48px; font-size: 17px; }
.drawer-empty { text-align: center; padding: 56px 8px; display: grid; gap: 10px; justify-items: center; }
.drawer-empty h3 { margin: 0; font-size: 26px; font-weight: 800; }
.drawer-empty p { margin: 0 0 8px; color: #444; }
.drawer-foot { border-top: 1px solid #e0e0dd; padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; background: var(--paper); }
.sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 18px; font-variant-numeric: tabular-nums; }
.sum-row strong { font-size: 24px; font-weight: 800; }
.weight-note { margin: 0; font-size: 14px; color: #555; line-height: 1.4; }
.btn--block { display: flex; align-items: center; justify-content: center; width: 100%; text-decoration: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.drawer-was { text-decoration: line-through; color: #777; margin-inline-start: 6px; }
.drawer-sale { color: #a02300; font-weight: 700; }
.co-item .q s { color: #777; }
.sum-row.save { color: #14541f; font-weight: 700; }
.member-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: #e3f3e6; border: 1px solid #2f8a45; color: #14541f; font-weight: 700; font-size: 15px; }
.member-note[hidden] { display: none; }

/* ---------- קופה ---------- */
.checkout { background: var(--mist); padding: clamp(20px, 3vw, 44px) clamp(16px, 4.4vw, 64px) clamp(40px, 6vw, 88px); min-height: 50vh; }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.co-form { display: grid; gap: clamp(14px, 1.6vw, 20px); min-width: 0; }
.co-form .panel h2, .co-summary h2 { font-size: 22px; }
.co-summary { position: sticky; top: 16px; }
.co-items { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.co-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 17px; }
.co-item .n { font-weight: 700; overflow-wrap: anywhere; }
.co-item .q { grid-column: 1; font-size: 15px; color: #555; }
.co-item .l { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.co-sums { border-top: 1px solid #dcdcd9; padding-top: 12px; display: grid; gap: 8px; }
.co-sums .sum-row.total { border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 4px; font-size: 20px; font-weight: 800; }
.co-sums .sum-row.total strong { font-size: 28px; }
.co-sums .hint-line { font-size: 14px; color: #555; margin: 0; }
.delivery-fields { display: grid; gap: 12px; padding-top: 6px; }
.delivery-fields[hidden] { display: none; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.pay-note { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--mist); border: 1px dashed #999; font-size: 16px; line-height: 1.5; }
.form-error { margin: 0; padding: 12px 16px; border-radius: 10px; background: #fbe9ec; border: 2px solid var(--wine); color: #6d1220; font-weight: 700; }
.form-error[hidden] { display: none; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--wine); }

/* ---------- אישור הזמנה ---------- */
.confirm { background: var(--mist); padding: clamp(24px, 4vw, 56px) clamp(16px, 4.4vw, 64px) clamp(40px, 6vw, 88px); }
.confirm-card { max-width: 760px; margin-inline: auto; display: grid; gap: 18px; }
.confirm-id { display: inline-block; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: .06em; direction: ltr; background: var(--ink); color: #fff; padding: 6px 18px; border-radius: 12px; }
.confirm h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.confirm dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 18px; }
.confirm dt { font-weight: 800; }
.confirm dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 960px) {
  .co-grid { grid-template-columns: minmax(0, 1fr); }
  .co-summary { position: static; order: -1; }
}
@media (max-width: 520px) {
  .row3 { grid-template-columns: 1fr 1fr; }
  .row3 .field:first-child { grid-column: 1 / -1; }
  .drawer-item { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; }
  .drawer-thumb { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-overlay { transition: none; } }

.club-status { margin: 0; font-size: 15px; font-weight: 700; min-height: 1.2em; }
.club-status.is-ok { color: #14541f; }
.club-status.is-miss { color: var(--wine); }
.club-status button { font: inherit; font-weight: 700; color: var(--fire); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0 4px; }
.addr-offer { margin: 0; padding: 10px 14px; border-radius: 10px; background: #e3f3e6; border: 1px solid #2f8a45; color: #14541f; font-weight: 700; font-size: 15px; }
.addr-offer[hidden] { display: none; }
.addr-offer button { font: inherit; font-weight: 800; color: #14541f; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0 4px; }
.drawer-cut select, .card-cut select { font: inherit; font-size: 15px; padding: 6px 10px; border: 2px solid #b9b9b4; border-radius: 10px; background: var(--paper); color: var(--ink); max-width: 100%; }
.drawer-cut:focus, .card-cut select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(255,60,0,.35); }
.cut-tag { display: inline-block; font-size: 13px; font-weight: 700; background: var(--mist); border: 1px solid #b9b9b4; border-radius: 20px; padding: 0 10px; margin-inline-start: 6px; }

.drawer-note, .co-note, .card-note { display: grid; gap: 4px; font-size: 14px; font-weight: 700; margin-top: 6px; }
.drawer-note textarea, .co-note textarea, .card-note textarea { font: inherit; font-size: 15px; font-weight: 400; padding: 6px 10px; border: 2px solid #b9b9b4; border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%; box-sizing: border-box; resize: vertical; }
.drawer-note textarea:focus, .co-note textarea:focus, .card-note textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(255,60,0,.35); }
.co-note { grid-column: 1 / -1; }
.item-note { font-size: 14px; font-weight: 700; color: #7a2e00; overflow-wrap: anywhere; }

.cutp { position: relative; margin-top: 6px; }
.cutp-btn { font: inherit; font-size: 15px; width: 100%; display: flex; align-items: center; gap: 4px; text-align: start; padding: 8px 12px; min-height: 40px; border: 2px solid #b9b9b4; border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; }
.cutp-btn .cutp-t { font-weight: 700; white-space: nowrap; }
.cutp-btn .cutp-lab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cutp-btn.has-val { border-color: var(--ink); }
.cutp-btn:focus-visible { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(255,60,0,.45); }
.cutp-panel { margin-top: 4px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); max-height: 210px; overflow-y: auto; padding: 4px; }
.cutp-panel[hidden] { display: none; }
.cutp-panel label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 40px; border-radius: 8px; font-size: 16px; cursor: pointer; }
.cutp-panel label:hover { background: var(--mist); }
.cutp-panel input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.cutp-panel label:has(input:focus-visible) { box-shadow: inset 0 0 0 3px rgba(255,60,0,.45); }
.cutp.card-cut, .cutp.drawer-cut { display: block; }

/* ---------- הצעות לעגלה (upsell) ---------- */
.sg { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line, #e6dfd6); }
.sg[hidden] { display: none; }
.sg-title { margin: 0 0 10px; font-size: 1rem; }
.sg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sg--co .sg-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line, #e6dfd6); border-radius: 10px; background: #fff; min-width: 0; }
.sg-thumb { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: #f3eee8; }
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-thumb img.ph { object-fit: contain; padding: 6px; opacity: .6; }
.sg-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sg-name { font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.sg-price { font-size: .85rem; color: #5b5149; }
.sg-why { align-self: flex-start; font-size: .75rem; color: #6b4a2b; background: #f6ede2; border-radius: 999px; padding: 1px 8px; }
.sg-why--sale { color: #8a1c1c; background: #fbe7e5; }
.sg-add { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1.5px solid #7a1f1f; background: #fff; color: #7a1f1f; font: inherit; font-weight: 600; cursor: pointer; }
.sg-add:hover:not(:disabled) { background: #7a1f1f; color: #fff; }
.sg-add:disabled { opacity: .5; cursor: default; }
.sg-reorder { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: start; padding: 12px 14px; margin-bottom: 14px; border: 1.5px dashed #7a1f1f; border-radius: 10px; background: #fdf6f4; color: inherit; font: inherit; cursor: pointer; }
.sg-reorder span { font-size: .85rem; color: #5b5149; }
.sg-reorder:hover:not(:disabled) { background: #f9e9e5; }
.sg-panel { padding-top: 6px; }
.sg-panel .sg { margin: 0; padding: 0; border: 0; }
.card-related { margin: 6px 0 0; font-size: .85rem; color: #5b5149; }
.card-related a { color: #7a1f1f; text-decoration: underline; }
.drawer-empty + .sg { margin-top: 8px; }

/* הצעות עם בחירת כמות + קישור לעמוד מוצר */
.drawer-name { display: block; color: inherit; text-decoration: none; }
.drawer-name:hover, .drawer-name:focus-visible { text-decoration: underline; }
.sg-item { display: grid; gap: 8px; align-items: stretch; }
.sg-top { display: flex; gap: 10px; align-items: center; min-width: 0; }
.sg-thumb { display: block; }
.sg-name { color: inherit; text-decoration: none; }
.sg-name:hover, .sg-name:focus-visible { text-decoration: underline; }
.sg-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-ctl .stepper--sm button { width: 36px; height: 36px; }
.sg-unit { font-size: .8rem; color: #5b5149; }
.sg-total { font-size: .85rem; font-weight: 700; margin-inline-start: auto; }

/* ---------- כשרות: בורר ללקוח ---------- */
.kp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; font-size: 15px; }
.kp-t { font-weight: 800; }
.kp--one { padding: 4px 10px; border-radius: 999px; background: var(--mist); border: 1px solid #cfcfca; width: fit-content; }
.kp-group { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.kp-chip { position: relative; display: inline-flex; cursor: pointer; }
.kp-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kp-chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border: 2px solid #b9b9b4; border-radius: 999px; background: var(--paper); font-size: 15px; font-weight: 700; line-height: 1.1; }
.kp-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.kp-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,60,0,.45); }
.kp.co-kp { grid-column: 1 / -1; }
.chips--k { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.chips-label { font-weight: 800; font-size: 15px; }
