/* =========================================================
   מרתף היין שלי — עיצוב "יקב בורדו"
   כללי העיצוב המלאים: CLAUDE.md, סעיף "עיצוב"
   ========================================================= */

/* ===== גופנים מקומיים (תיקיית fonts, כדי שיופיעו גם בלי אינטרנט) =====
   מקור: Google Fonts. Assistant הוא גופן משתנה: קובץ אחד לכל המשקלים 300-700. */
@font-face {
  font-family: "Assistant";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/assistant-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: "Assistant";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/assistant-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bellefair";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bellefair-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: "Bellefair";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bellefair-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== צבעים וערכים כלליים ===== */
:root {
  /* רקעים */
  --bg: #2a0a12;            /* בורדו עמוק — רקע הדף */
  --bg-glow: #4a1320;       /* תאורה חמה בראש הדף */
  --surface: #3a111c;       /* כרטיסים וחלונות */
  --surface-2: #451623;     /* שכבה בהירה מעט יותר (מעבר צבע בכרטיס) */

  /* זהב */
  --gold: #d8b878;
  --gold-light: #e3c88e;
  --gold-deep: #c9a45c;
  --gold-line: rgba(216, 184, 120, 0.35); /* קווים ומסגרות דקות */

  /* טקסט */
  --text: #f6ecdc;          /* שמנת — טקסט ראשי */
  --text-soft: #c9b3a4;     /* טקסט משני */
  --text-on-gold: #2a0a12;  /* טקסט על כפתור זהב */

  /* יין — רק בתוך איורים (למשל היין בתוך הכוס) */
  --wine: #8a2436;
  /* קווי איורים ואייקונים */
  --line-thin: 1.4;

  /* גופנים */
  --font-heading: "Bellefair", "David", "Times New Roman", serif;
  --font-body: "Assistant", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* צורה ומרווחים */
  --radius: 14px;           /* כרטיסים */
  --radius-pill: 999px;     /* כפתורים ותגיות */
  --tap: 52px;              /* גובה מינימלי לכפתור — נוח לאצבע */
  --gap: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg) radial-gradient(ellipse at top, var(--bg-glow) 0%, var(--bg) 60%) no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
}

/* ===== כותרת עליונה ===== */
.app-header {
  text-align: center;
  padding: calc(34px + env(safe-area-inset-top)) 24px 22px;
  border-bottom: 1px solid var(--gold-line);
}

.header-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 6px;
}

.app-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1.2;
  color: var(--text);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--gold);
  font-size: 0.85rem;
}
.ornament::before,
.ornament::after {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--gold-line);
}

/* ===== איורים ואייקונים SVG — קווי מתאר דקים בזהב ===== */
.ornament-mark,
.empty-illustration {
  fill: none;
  stroke: var(--gold);
  stroke-width: var(--line-thin);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ornament-mark { color: var(--gold); }
.empty-illustration .thin { stroke-width: 1; opacity: 0.8; }
.empty-illustration .shine { stroke-width: 1; opacity: 0.45; }
.empty-illustration .wine-surface { stroke-width: 1; opacity: 0.7; }

/* ===== אזור התוכן ===== */
.app-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 22px calc(130px + env(safe-area-inset-bottom));
}

/* ===== מצב ריק ===== */
.empty-state {
  text-align: center;
  padding: 64px 16px;
  color: var(--text-soft);
}

.empty-illustration {
  display: block;
  margin: 0 auto 20px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.empty-title {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--gold);
}

.empty-text {
  margin: 0;
}

.hidden { display: none !important; }

/* ===== אייקונים (קווים דקים בזהב) ===== */
.icon {
  fill: none;
  stroke: var(--gold);
  stroke-width: var(--line-thin);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-large { stroke-width: 1.2; opacity: 0.85; }

/* ===== כפתורים ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  padding: 0 24px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: 0.6; cursor: default; }

.btn-primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  color: var(--text-on-gold);
  border: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
/* כפתור מסוכן (מחיקה): שקוף, בשמנת עמומה. לא אדום בוהק. */
.btn-danger {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--text-soft);
}
.btn-text {
  background: transparent;
  color: var(--text-soft);
  border: none;
  min-height: 44px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn:focus-visible,
.icon-btn:focus-visible,
.stepper-btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.btn-row .btn { padding: 0 12px; }

/* ===== פס כפתורים תחתון ===== */
.bottom-bar {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 22px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(to top, var(--bg) 62%, rgba(42, 10, 18, 0));
}

/* פס כפתורים בשורה: הכפתור הראשי רחב והמשני צר, זה לצד זה, כדי לא לכסות חצי מסך */
.bottom-bar-row {
  flex-direction: row;
  gap: 12px;
  padding-top: 24px;
}
.bottom-bar-row .btn-primary { flex: 2; }
.bottom-bar-row .btn-secondary { flex: 1; background: var(--bg); }

/* ===== כותרת מסך (חזרה + שם) ===== */
.screen-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px 0 22px;
}
.screen-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--gold);
}
.icon-btn {
  width: var(--tap);
  height: var(--tap);
  margin-inline-start: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ===== טופס ===== */
.field { margin-bottom: 26px; }

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}
.required {
  margin-inline-start: 6px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gold);
}

.input {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}
.input::placeholder { color: var(--text-soft); opacity: 0.7; }
.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.input.invalid,
.color-choices.invalid { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.input-other { margin-top: 10px; }

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20' fill='none' stroke='%23d8b878' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9 L12 15 L18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 20px;
}
.select option, .select optgroup { background: var(--surface); color: var(--text); }

/* הודעות שגיאה: בזהב, בלי צבע אדום בוהק */
.error {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--gold);
}
.error-box {
  padding: 12px 16px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

/* בחירת צבע יין */
.color-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px;
  border-radius: var(--radius);
}
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 22px;
  font-size: 1.02rem;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-pill);
}
.choice input:checked + span {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  color: var(--text-on-gold);
  border-color: transparent;
  font-weight: 600;
}
.choice input:focus-visible + span {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

/* כמות */
.stepper {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.stepper-btn {
  flex: 0 0 var(--tap);
  height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stepper-value {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
  -moz-appearance: textfield;
}
.stepper-value::-webkit-outer-spin-button,
.stepper-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* תמונה */
.photo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  overflow: hidden;
  background: var(--surface);
  border: 1px dashed var(--gold-line);
  border-radius: var(--radius);
}
.photo-preview {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
}
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  color: var(--text-soft);
}

/* ===== הודעה קצרה (toast) ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(120px + env(safe-area-inset-bottom));
  z-index: 30;
  transform: translateX(-50%);
  padding: 12px 26px;
  color: var(--gold);
  background: var(--surface);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  white-space: nowrap;
}

/* ===== כרטיס (בסיס) ===== */
.card {
  padding: 18px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== רשימת הבקבוקים ===== */
.list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--gold);
}
.list-count { font-size: 0.95rem; color: var(--text-soft); }

/* ===== חיפוש, סינון ומיון ===== */
.list-controls { margin-bottom: 22px; }

.search-box { position: relative; }
.search-input {
  padding-inline-start: 48px;
  padding-inline-end: 48px;
}
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 16px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.85;
}
.search-clear {
  position: absolute;
  top: 4px;
  inset-inline-end: 2px;
  width: 44px;
  height: 44px;
  margin: 0;
}

/* שורה אחת שנגללת הצידה (בטלפון), כדי לא לתפוס חצי מסך. נמתחת עד שולי המסך. */
.chips {
  display: flex;
  gap: 8px;
  margin: 14px -22px 0;
  padding: 2px 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-pill);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chip[aria-pressed="true"] {
  color: var(--text-on-gold);
  font-weight: 600;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  border-color: transparent;
}
.chip:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

.sort-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.sort-label { flex: 0 0 auto; color: var(--text-soft); }
.sort-row .select { flex: 1; }

.no-results {
  padding: 32px 8px;
  text-align: center;
  color: var(--text-soft);
}
.no-results .empty-text { margin-bottom: 22px; }

.bottle-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.bottle-card {
  display: flex;
  gap: 16px;
  align-items: stretch;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.bottle-card:active { border-color: var(--gold); }
.bottle-card:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.bottle-card.is-finished { opacity: 0.55; }

.bottle-thumb {
  flex: 0 0 68px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--bg));
  border: 1px solid var(--gold-line);
  border-radius: 10px;
}
.bottle-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.icon-thumb { width: 26px; height: 52px; opacity: 0.85; }

.bottle-body { flex: 1; min-width: 0; }
.bottle-name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.bottle-sub {
  margin: 2px 0 0;
  font-size: 0.95rem;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}
.bottle-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* תגית */
.tag {
  padding: 1px 12px;
  font-size: 0.82rem;
  color: var(--gold);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-pill);
}
.tag-finished { color: var(--text-soft); border-color: var(--text-soft); }

/* ===== מסך פרטי בקבוק ===== */
.detail-photo {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.detail-name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.detail-sub { margin-top: 6px; font-size: 1.05rem; }
.detail-meta { margin: 14px 0 24px; }

.detail-card { margin: 0 0 16px; padding: 6px 18px; }
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--gold-line);
}
.detail-row:last-child { border-bottom: none; }
.detail-row dt { color: var(--text-soft); flex: 0 0 auto; }
.detail-row dd { margin: 0; text-align: start; overflow-wrap: anywhere; }

/* ===== מסך גיבוי ושחזור ===== */
.backup-link { display: block; margin: 28px auto 0; }
.backup-summary { margin: 0 0 20px; color: var(--text-soft); }
.backup-card { margin-bottom: 16px; }
.app-version { margin: 26px 0 0; text-align: center; font-size: 0.85rem; color: var(--text-soft); direction: rtl; }
.card-text { margin: 0 0 18px; color: var(--text-soft); }
.card-text strong { color: var(--text); font-weight: 600; }
.card-title,
.detail-notes-title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--gold);
}
.detail-notes-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-notes { margin-bottom: 16px; }
.btn-delete { margin-top: 28px; }

/* ===== חלון אישור ===== */
.dialog {
  width: min(92vw, 420px);
  padding: 26px 22px 22px;
  color: var(--text);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.dialog::backdrop { background: rgba(10, 2, 5, 0.72); }
.dialog-title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--gold);
  overflow-wrap: anywhere;
}
.dialog-text { margin: 0 0 22px; color: var(--text-soft); }
.dialog-actions { display: flex; flex-direction: column; gap: 12px; }

/* ===== "הציון שלי": בחירת כוכבים ===== */
.rating-card { margin-bottom: 16px; padding-bottom: 8px; }
.rating-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.rating-head .detail-notes-title { margin: 0; }
.link-btn {
  min-height: 44px;
  padding: 0 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-soft);
  background: transparent;
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.star-picker {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.star-btn {
  flex: 1;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.star-btn .star { width: 38px; height: 38px; }
.star-btn.is-on .star { fill: var(--gold); }
.star-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

/* דירוג */
.rating { display: inline-flex; align-items: center; gap: 2px; }
.star {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linejoin: round;
}
.star-filled { fill: var(--gold); }

/* ===== המקרר (מסך הפתיחה) ===== */
.fridge-stage { max-width: 320px; margin: 0 auto; }

.fridge {
  position: relative;
  perspective: 1400px;   /* עומק לדלת שנפתחת */
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

/* איור המקרר: איור מוצר בפלדה שחורה ופליז. הצבעים והחומרים כולם בתוך ה-SVG
   (FRIDGE_PALETTE ו-BOTTLE_COLORS ב-app.js), ולכן כאן רק גודל. */
.fridge-art {
  display: block;
  width: 100%;
  height: auto;
}

/* אזורי הלחיצה של המדפים: שכבה שקופה מעל האיור, כל מדף ברוחב מלא */
.fridge-shelves { position: absolute; inset: 0; }
.shelf-hit {
  position: absolute;
  inset-inline: 5%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 10px;
  font-family: var(--font-body);
  color: var(--text);
  text-align: start;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shelf-hit:active { background: var(--gold-line); }
.shelf-hit:focus-visible { outline: 2px solid var(--gold-light); outline-offset: -2px; }
.shelf-name { font-size: 0.95rem; font-weight: 600; color: var(--gold); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }
.shelf-count { font-size: 0.85rem; color: var(--text-soft); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }
/* התוויות מופיעות רק כשהדלת פתוחה (כשהיא סגורה הידית והזכוכית נקיות) */
.shelf-hit span { transition: opacity 0.5s ease 0.45s; }
.fridge:not(.is-open) .shelf-hit span { opacity: 0; transition: none; }

/* הדלת: זכוכית עם ידית. נפתחת בסיבוב סביב הציר הימני ואז נעלמת */
.fridge-door {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transform-origin: right center;
  backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.9s cubic-bezier(0.4, 0.1, 0.2, 1), opacity 0.25s ease;
}
.fridge-door:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; border-radius: 14px; }
/* לוחית קטנה על הזכוכית */
.door-label {
  position: absolute;
  left: 50%;
  bottom: 5.5%;
  transform: translateX(-50%);
  padding: 3px 16px;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gold);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-pill);
  pointer-events: none;
}
.fridge.is-open .fridge-door {
  transform: rotateY(100deg);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.4, 0.1, 0.2, 1), opacity 0.5s ease 0.3s;
}
@media (prefers-reduced-motion: reduce) {
  .fridge-door,
  .fridge.is-open .fridge-door { transition: none; }
}

.fridge-hint {
  margin: 20px 0 0;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--gold);
}
.fridge-hint:empty { display: none; }
.fridge-close { display: block; margin: 0 auto; }
.fridge-summary {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.fridge-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 22px;
  margin-top: 12px;
}

/* ===== הגדרת המקרר ===== */
.fridge-preview {
  max-width: 190px;
  margin: 4px auto 28px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}
.fridge-preview .fridge-art { width: 100%; }

/* כמות עם כפתורי פלוס ומינוס (מספר בלבד, בלי הקלדה) */
.stepper-btn .icon { width: 24px; height: 24px; }
.stepper-btn:disabled { opacity: 0.35; cursor: default; }
.stepper-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.dialog-stepper { margin-bottom: 22px; }

/* ===== מדף ובחירת בקבוק למדף ===== */
.shelf-item { padding: 14px 16px; }
.shelf-item-link {
  display: flex;
  gap: 16px;
  align-items: stretch;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.shelf-item-link:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 10px; }
.shelf-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gold-line);
}
.shelf-item-label { color: var(--text-soft); }
.shelf-item .btn-row { margin-top: 14px; }
.shelf-item-controls .stepper { flex: 0 0 auto; }
.shelf-item-controls .stepper-display { flex: 0 0 56px; padding: 0; }

.pick-item {
  display: flex;
  gap: 16px;
  align-items: stretch;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pick-item:active { border-color: var(--gold); }
.pick-item:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
