/* ==========================================================================
   Mini-cart (עגלה צדדית). מגירה מצד שמאל (קצה הכותרת ב-RTL, ליד כפתור העגלה).
   מובייל: רוחב min(352px, 90vw). דסקטופ: 500px.
   ========================================================================== */
.mc { position: fixed; inset: 0; z-index: calc(var(--z-sheet) + 3); }
.mc[hidden] { display: none; }
.mc__scrim { position: absolute; inset: 0; background: rgba(17,17,17,.5); animation: fp-fade .2s ease both; }
.mc__drawer {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(352px, 90vw);
  display: flex; flex-direction: column; background: var(--surface);
  border-right: var(--bw) solid var(--ink); outline: 0;
  animation: mc-slide .45s var(--ease) both;
}
@keyframes mc-slide { from { transform: translateX(-36px); opacity: 0; } to { transform: none; opacity: 1; } }
html.has-minicart { overflow: hidden; }
/* ה-toast של העמוד מיותר כשהמגירה פתוחה */
html.has-minicart .toast { display: none; }

.mc__head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; padding-inline: 16px 4px; border-bottom: var(--bw) solid var(--ink); }
.mc__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mc__title strong { font-size: 18px; white-space: nowrap; }
.mc__tick { width: 28px; height: 28px; flex-shrink: 0; background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--ink); display: flex; align-items: center; justify-content: center; }
.mc__x { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.mc__x:hover { background: var(--stage); }

.mc__ship { flex-shrink: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mc__ship-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.mc__bar { margin-top: 10px; height: 8px; background: var(--line); }
.mc__bar span { display: block; height: 8px; background: var(--accent); box-shadow: inset 0 0 0 1px var(--ink); transition: width .5s var(--ease); }

.mc__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mc__lines { display: block; }
.mc-line { display: grid; grid-template-columns: 88px 1fr; border-bottom: 1px solid var(--line); background: var(--surface); }
.mc-line.is-new { background: #F4FBD8; }
.mc-line__img { position: relative; min-height: 104px; background: var(--stage); }
.mc-line__img img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.mc-line.is-oos .mc-line__img img { opacity: .45; filter: grayscale(1); }
.mc-line__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; }
.mc-line__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mc-line__title { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.mc-line__tags { display: flex; gap: 8px; align-items: center; min-height: 16px; }
.mc-line__tier { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--ink-2); }
.mc-line__new { font-size: 11px; font-weight: 800; background: var(--ink); color: var(--accent); padding: 0 7px; }
.mc-line__title strong { font-size: 16px; line-height: 22px; text-align: start; }
.mc-line__rm { width: 36px; height: 36px; margin: -6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mc-line__rm:hover { background: var(--stage); }
.mc-line__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.mc-line__meta .swatch { width: 14px; height: 14px; }
.mc-line__note { font-size: 12px; font-weight: 700; color: var(--ok); }
.mc-line__note--warn { color: var(--warn); }
.mc-line__bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mc-line .stepper { height: 38px; }
.mc-line .stepper button { width: 38px; }
.mc-line__total { font-size: 18px; white-space: nowrap; }
.mc-line.is-oos .mc-line__total { text-decoration: line-through; color: var(--ink-2); }

.mc-up { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.mc-up__card { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--ink); padding-inline-end: 12px; }
.mc-up__img { position: relative; height: 60px; background: var(--stage); }
.mc-up__img img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.mc-up__t { display: flex; flex-direction: column; line-height: 20px; min-width: 0; }
.mc-up__t strong { font-size: 15px; text-align: start; }
.mc-up__t span { font-size: 13px; }
.mc-up .btn { min-height: 40px; padding-inline: 14px; font-size: 14px; }

.mc__foot { flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); border-top: var(--bw) solid var(--ink); background: var(--surface); }
.mc__sum { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.mc__sum > div { display: flex; justify-content: space-between; }
.mc__sum dd { margin: 0; font-weight: 700; }
.mc__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line); }
.mc__total > span { font-weight: 700; }
.mc__total strong { font-size: 28px; line-height: 34px; font-weight: 800; letter-spacing: -.03em; }
.mc__foot .btn--lg { padding-inline: 20px; }
.mc__links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc__links .btn { min-height: 48px; padding-inline: 8px; font-size: 14px; }

.mc__empty { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 32px 24px 64px; }
.mc__empty-h { font-size: 32px; line-height: 36px; font-weight: 800; letter-spacing: -.03em; }
.mc__empty-cta { display: flex; flex-wrap: wrap; }
.mc__demo { align-self: flex-start; padding: 8px 0; font-size: 14px; text-decoration: underline; }

@media (min-width: 768px) {
  .mc__drawer { width: 500px; }
  .mc__head { height: 76px; padding-inline: 24px 12px; }
  .mc__title strong { font-size: 20px; }
  .mc__ship { padding: 16px 24px; }
  .mc-line { grid-template-columns: 96px 1fr; }
  .mc-line__img { min-height: 112px; }
  .mc-line__body { padding: 14px 18px; gap: 8px; }
  .mc-line__title strong { font-size: 18px; line-height: 24px; }
  .mc-line__meta { font-size: 14px; }
  .mc-line .stepper { height: 40px; }
  .mc-line .stepper button { width: 40px; }
  .mc-line__total { font-size: 19px; }
  .mc-up { padding: 18px 24px 22px; }
  .mc-up__card { grid-template-columns: 72px 1fr auto; gap: 14px; padding-inline-end: 14px; }
  .mc-up__img { height: 72px; }
  .mc-up__t strong { font-size: 16px; }
  .mc-up .btn { min-height: 42px; padding-inline: 16px; }
  .mc__foot { padding: 18px 24px 24px; }
  .mc__total strong { font-size: 32px; line-height: 36px; }
  .mc__links .btn { min-height: 50px; font-size: 15px; }
  .mc__empty { padding: 32px 32px 64px; }
  .mc__empty-h { font-size: 36px; line-height: 40px; }
}
