/* עמוד מכירה גיפטקארדים – ועדי הורים, פסח – עיצוב בסגנון Happy Gift */
:root {
  --primary: #ec0f7a;
  --primary-dark: #860945;
  --secondary: #261C58;
  --secondary-hover: #3a2a6f;
  --accent-orange: #ff4e00;
  --accent-orange-border: rgba(255, 78, 0, 0.2);
  --bg: #ffffff;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --header-bg: #f0f0f4;
  --text: #261C58;
  --text-muted: #4c4e6b;
  --border: #e5e7eb;
  --success: #059669;
  --error: #b91c1c;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-card: 16px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 25px 50px -12px rgb(0 0 0 / 0.12);
  --shadow-card: 0 10px 40px -10px rgb(0 0 0 / 0.15);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  min-width: 0;
}

/* עמוד ראשון: שורת כרטיסי הגיפטקארד פרוסה לאורך העמוד */
.sale-flow.container:has(#panelProducts.active) {
  max-width: 1400px;
}

/* מתחת ל-1024: נייד וטאבלט – הגבלה על התמונות, עמודה אחת */
@media (max-width: 1023px) {
  .sale-flow.container:has(#panelProducts.active) .flow-card {
    max-width: 520px;
    margin-right: auto;
    margin-left: auto;
    overflow: visible;
  }
}

/* כותרת "בחרו גיפטקארד" ו"לחצו על המוצר..." באותו קו כמו השלבים (720px) – טאבלט */
@media (min-width: 721px) and (max-width: 1023px) {
  .sale-flow.container:has(#panelProducts.active) #panelProducts > h2,
  .sale-flow.container:has(#panelProducts.active) #panelProducts > .panel-desc {
    width: 720px;
    max-width: calc(100vw - 40px);
    margin-right: -100px;
    margin-left: -100px;
    box-sizing: border-box;
  }
}


main {
  min-width: 0;
  overflow-x: hidden;
}

/* Header – בסגנון Happy Gift */
.header {
  background: var(--header-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
}

.header-inner {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  padding: 18px 24px 18px 0;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  min-height: 52px;
}

.header-title-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.header-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.logo {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
}

.header-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.header nav {
  display: flex;
  gap: 24px;
}

.header nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.header nav a:hover {
  color: var(--primary);
}

/* בלוק פתיחה – כותרת ותיאור */
.page-intro {
  padding: 40px 20px 32px;
  text-align: center;
}

.page-intro-title {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3.5vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.page-intro-title::after {
  content: "";
  display: block;
  width: 96px;
  height: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 2px;
}

.page-intro-desc {
  margin: 0;
  max-width: 580px;
  margin-right: auto;
  margin-left: auto;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* נייד בלבד: כותרת טיפה יותר למטה */
@media (max-width: 767px) {
  .page-intro {
    padding-top: 52px;
  }
  .page-intro-title {
    margin-top: 12px;
  }
}

/* תהליך הרכישה – עיצוב מעודכן */
.sale-flow {
  padding: 0 20px 56px;
}

.progress-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

/* קו שמגיע עד שפת העיגולים (לא נכנס) – 36px = קוטר עיגול מכל צד */
.progress-line {
  position: absolute;
  top: calc(18px - 3px / 2);
  right: 36px;
  left: 36px;
  height: 3px;
  background: var(--border);
  z-index: 0;
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
}

.progress-line-fill {
  display: block;
  height: 100%;
  width: var(--progress-pct, 0%);
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.step-dot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-dot span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.step-dot.active span,
.step-dot.done span {
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(236, 15, 122, 0.35);
}

.step-dot label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  max-width: 70px;
}

.step-dot.active label {
  color: var(--primary);
  font-weight: 600;
}

/* שלבים – לחיצה רק לחזרה (לא קדימה) */
.progress-steps[data-current-step='1'] .step-dot {
  cursor: default;
  pointer-events: none;
}
.progress-steps[data-current-step='2'] .step-dot[data-step='1'] {
  cursor: pointer;
}
.progress-steps[data-current-step='2'] .step-dot[data-step='2'],
.progress-steps[data-current-step='2'] .step-dot[data-step='3'] {
  cursor: default;
  pointer-events: none;
}
.progress-steps[data-current-step='3'] .step-dot[data-step='1'],
.progress-steps[data-current-step='3'] .step-dot[data-step='2'] {
  cursor: pointer;
}
.progress-steps[data-current-step='3'] .step-dot[data-step='3'] {
  cursor: default;
  pointer-events: none;
}

/* חץ חזרה ב-header – רק בנייד, חץ שחור למטה, בצד השני */
.header-mobile-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.header-mobile-back:hover {
  opacity: 0.7;
}

/* חץ ימינה – צ'ברון (חזרה בצד ימין) */
.header-mobile-back .mobile-back-arrow {
  display: inline-block;
  width: 14px;
  height: 14px;
  position: relative;
  box-sizing: border-box;
  transform: scaleX(-1);
}

.header-mobile-back .mobile-back-arrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2.5px;
  background: currentColor;
  transform: translateY(-50%) rotate(-45deg);
  transform-origin: left center;
}

.header-mobile-back .mobile-back-arrow::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2.5px;
  background: currentColor;
  transform: translateY(-50%) rotate(45deg);
  transform-origin: left center;
}

@media (min-width: 601px) {
  .header-mobile-back {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .header-mobile-back[aria-hidden='false'] {
    display: flex;
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
  }
}

.flow-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px 28px 40px;
  border: 2px solid var(--accent-orange-border);
  min-width: 0;
  max-width: 100%;
}

/* עמוד ראשון בלבד: בלי תיבה חיצונית */
.flow-card:has(#panelProducts.active) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.step-panel h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.panel-desc {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* שלב 2: תמונת הכרטיס מוסתרת עד שנבחר מוצר */
.step2-product-img {
  display: none;
}

/* עמוד 2 (פרטי ההזמנה): סוג כרטיס + אחוז הנחה בורד, תמיד באותה שורה */
#panelChoice .order-summary__product {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#panelChoice .order-summary__product .panel-desc.selected-product {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  flex: 1 1 auto;
}

/* תגית אחוז הנחה – ורד, קבועה, לא יורדת שורה */
#panelChoice .order-summary__product .step2-discount {
  display: none;
  margin-inline-start: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(236, 15, 122, 0.12);
  padding: 4px 9px;
  border-radius: 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

#panelChoice .order-summary__product .step2-discount.step2-discount-visible {
  display: inline-block;
}

.panel-desc.selected-product {
  font-weight: 600;
  color: var(--text);
}

.product-link-inline {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--primary);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
}

.product-link-inline:hover {
  text-decoration: underline;
}

/* רשת מוצרים – כרטיסים בסגנון Happy Gift */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}

.product-card {
  border: 2px solid var(--accent-orange-border);
  border-radius: var(--radius-card);
  padding: 24px;
  background: var(--surface);
  transition: box-shadow 0.3s, border-color 0.25s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  min-width: 0;
  max-width: 100%;
}

.product-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(236, 15, 122, 0.08);
  border-color: rgba(236, 15, 122, 0.35);
}

/* ביטול מסגרת ורודה כשמשהו בתוך הכרטיס במצב פוקוס (לחיצה על לפרטים וכו') */
.product-card:focus-within {
  border-color: var(--accent-orange-border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(236, 15, 122, 0.06) 0%, rgba(134, 9, 69, 0.08) 100%);
  margin-bottom: 16px;
}

/* ברק לבן – מופיע רק כשהעכבר על התמונה, בהתחלה לא נראה כלום */
.product-image-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 40%,
    rgba(255, 255, 255, 0.18) 60%,
    transparent 100%
  );
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.15s ease;
  pointer-events: none;
  z-index: 1;
}
.product-image-wrap:hover::after {
  opacity: 1;
  transform: translateX(-120%);
}

/* תגית הנחה בסגנון ribbon – פינה עליונה, חיתוך V בתחתית */
.product-badge {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  padding: 14px 8px 22px 8px;
  color: #fff;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  box-shadow: 0 2px 10px rgba(236, 15, 122, 0.4);
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: box-shadow 0.25s ease;
}

.product-card:hover .product-badge {
  box-shadow: 0 4px 16px rgba(236, 15, 122, 0.5);
}

.product-badge__value {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.product-badge__label {
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.product-badge--discount {
  padding: 14px 8px 24px 8px;
}

/* דסקטופ (1024px+): תגית בגודל שמתאים */
@media (min-width: 1024px) {
  .product-badge {
    width: 58px;
    padding: 12px 8px 20px 8px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  }
  .product-badge--discount {
    padding: 12px 8px 24px 8px;
  }
  .product-badge__value {
    font-size: 1.5rem;
  }
  .product-badge__label {
    font-size: 0.7rem;
    margin-top: 4px;
  }
}

/* טאבלט (768px–1023px): תגית מוגדלת */
@media (min-width: 768px) and (max-width: 1023px) {
  .product-badge {
    width: 58px;
    padding: 12px 8px 20px 8px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  }
  .product-badge--discount {
    padding: 12px 8px 24px 8px;
  }
  .product-badge__value {
    font-size: 1.5rem;
  }
  .product-badge__label {
    font-size: 0.72rem;
    margin-top: 4px;
  }
}

/* נייד: תגית הנחה מוגדלת */
@media (max-width: 600px) {
  .product-badge {
    width: 54px;
    right: 14px;
    padding: 11px 7px 18px 7px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  }
  .product-badge--discount {
    padding: 11px 7px 22px 7px;
  }
  .product-badge__value {
    font-size: 1.4rem;
  }
  .product-badge__label {
    font-size: 0.65rem;
    margin-top: 4px;
    letter-spacing: 0.06em;
  }
}

.product-image-link:focus,
.product-image-link:focus-visible {
  outline: none;
}
.product-image-link {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 140px;
  text-decoration: none;
  color: inherit;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.product-img-placeholder {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  background: linear-gradient(135deg, rgba(236, 15, 122, 0.06) 0%, rgba(134, 9, 69, 0.08) 100%);
}

.product-img-placeholder.visible {
  display: flex;
}

.product-img-placeholder span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--primary);
}

.product-info {
  text-align: center;
}

.product-info h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.product-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.product-title-link:hover {
  color: var(--primary);
}

.product-details-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  text-align: center;
  margin-bottom: 6px;
  padding: 12px 24px;
  border-radius: 9999px;
  border: 2px solid var(--primary);
  background: rgba(236, 15, 122, 0.06);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.product-details-link::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ec0f7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}
.product-details-link:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(236, 15, 122, 0.3);
}
.product-details-link:hover::before {
  filter: brightness(0) invert(1);
}
.product-details-link:focus,
.product-details-link:focus-visible {
  outline: none;
  box-shadow: none;
}

@media (max-width: 380px) {
  .product-details-link {
    font-size: 0.8rem;
    padding: 12px 16px;
  }
}

.product-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
}

.product-link:hover {
  text-decoration: underline;
}
.product-link:focus,
.product-link:focus-visible {
  outline: none;
}

.product-title-link:focus,
.product-title-link:focus-visible {
  outline: none;
}

.btn-choose {
  width: 100%;
  margin-top: 6px;
  border-radius: 9999px;
}
.btn-choose:focus,
.btn-choose:focus-visible {
  outline: none;
}

/* דסקטופ בלבד – שלב 1: כרטיסים לבנים, צל עדין */
@media (min-width: 768px) {
  #panelProducts .product-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s, border-color 0.25s;
  }
  #panelProducts .product-card:hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(236, 15, 122, 0.12);
    border-color: rgba(236, 15, 122, 0.2);
  }
  #panelProducts .product-card:focus-within {
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
  }
  #panelProducts .product-image-wrap {
    border-radius: 12px;
    margin-bottom: 16px;
  }
  #panelProducts .product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }
  #panelProducts .btn-choose {
    margin-top: 6px;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 9999px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 3px 12px rgba(236, 15, 122, 0.3);
  }
  #panelProducts .btn-choose:hover {
    box-shadow: 0 4px 16px rgba(236, 15, 122, 0.4);
  }
}

/* 1024px ומעלה: מחשב – שלושה כרטיסים בשורה. מתחת ל-1024 – נייד/טאבלט */
@media (min-width: 1024px) {
  #panelProducts .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 28px;
  }
}

/* כפתורים – בסגנון Happy Gift (מעוגלים, גרדיאנט) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(236, 15, 122, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 15, 122, 0.45);
}

.btn-secondary {
  background: var(--surface);
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  color: #fff;
  border-color: var(--secondary-hover);
}

.btn-text {
  background: transparent;
  color: var(--primary);
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-icon {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-icon:hover {
  background: #fee2e2;
  color: var(--error);
  border-color: #fecaca;
}

.btn-remove-row {
  flex-shrink: 0;
}

/* סוג אספקה – בחירה אחת: דיגיטלי או פיזי */
.delivery-type {
  margin-bottom: 28px;
}

.delivery-type__title {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.delivery-type__subtitle {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.delivery-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.delivery-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.delivery-option:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(236, 15, 122, 0.12);
}

.delivery-option.type-tab.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(236, 15, 122, 0.1) 0%, rgba(134, 9, 69, 0.06) 100%);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(236, 15, 122, 0.15);
}

/* כפתורי משלוח / איסוף עצמי (פיזי) */
.physical-delivery-block {
  margin-bottom: 24px;
}

.physical-delivery-block[hidden] {
  display: none !important;
}

.physical-delivery-block__title {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.physical-delivery-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.physical-delivery-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.physical-delivery-option:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(236, 15, 122, 0.12);
}

.physical-delivery-option.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(236, 15, 122, 0.12) 0%, rgba(134, 9, 69, 0.06) 100%);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(236, 15, 122, 0.15);
}

.physical-delivery-option__name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  display: block;
}

.physical-delivery-option__desc {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.35;
}

/* כתובת משלוח – 3 תיבות: עיר, רחוב, מס' בניין */
.delivery-address-block {
  margin-bottom: 24px;
}

.delivery-address-block[hidden] {
  display: none !important;
}

.delivery-address-block__title {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.delivery-address-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.delivery-address-fields .field {
  margin-bottom: 0;
}

.delivery-address-fields .field label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.delivery-address-fields .field input {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}

.delivery-address-fields .field input::placeholder {
  color: var(--text-muted);
}

.delivery-address-fields .field input:focus {
  outline: none;
  border-color: var(--text-muted);
  box-shadow: 0 0 0 1px var(--border);
}

@media (max-width: 600px) {
  .physical-delivery-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .delivery-address-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .delivery-address-fields .field input {
    padding: 10px 12px;
  }
}

@media (min-width: 769px) {
  .physical-delivery-block {
    margin-bottom: 20px;
  }

  .physical-delivery-options {
    gap: 14px;
  }

  .delivery-address-block {
    margin-bottom: 20px;
  }

  .delivery-address-fields {
    gap: 8px;
  }

  .delivery-address-fields .field input {
    padding: 6px 10px;
    font-size: 0.88rem;
  }
}

.delivery-option__icon {
  font-size: 2rem;
  margin-bottom: 10px;
  line-height: 1;
}

.delivery-option__name {
  font-size: 1.15rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.delivery-option__desc {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.9;
}

/* מסכים קטנים: שני הכפתורים נשארים באותו שורה ומתכווצים עם הדף */
@media (max-width: 400px) {
  .delivery-options {
    gap: 10px;
  }
  .delivery-option {
    padding: 10px 12px;
    font-size: 0.88rem;
  }
}
@media (max-width: 320px) {
  .delivery-options {
    gap: 8px;
  }
  .delivery-option {
    padding: 8px 10px;
    font-size: 0.82rem;
  }
}

/* חלון נפרד לכל סוג – מוצג לפי הבחירה */
.delivery-panel {
  display: none;
  margin-bottom: 24px;
}

.delivery-panel.delivery-panel--visible {
  display: block;
}

.cards-rows {
  margin-bottom: 0;
}

.cards-rows > label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.cards-rows-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.card-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  direction: rtl;
  text-align: right;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(236, 15, 122, 0.15);
}

.card-row input::placeholder {
  color: var(--text-muted);
}

.input-qty {
  max-width: 90px;
}

.input-amount {
  max-width: 110px;
}

.btn-add-row {
  margin-top: 12px;
  padding: 5px 14px;
  font-size: 0.85rem;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-add-row:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* שדות טופס – סגנון קו תחתון מינימלי */
.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.field label .required {
  color: var(--error);
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 0 12px 0;
  font-family: inherit;
  font-size: 1rem;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  transition: border-color 0.2s, border-width 0.2s;
  direction: rtl;
  text-align: right;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
  border-bottom-width: 2px;
}

.field input.error,
.field textarea.error {
  border-bottom-color: var(--error);
}

.field textarea {
  padding-top: 12px;
  resize: vertical;
  min-height: 80px;
}

.error-msg {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--error);
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}

.step-actions .btn-text {
  order: 0;
  margin-inline-start: -28px;
}

.step-actions .btn-primary {
  order: 1;
  margin-inline-start: auto;
}

/* מתחת ל-300px: החזרה ירד למטה (כפתורים בערימה) */
@media (max-width: 299px) {
  .step-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
  }
  .step-actions .btn-text {
    margin-inline-start: 0;
    order: 1;
    align-self: flex-start;
    margin-inline-start: -16px;
  }
  .step-actions .btn-primary {
    order: 0;
    margin-inline-start: 0;
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

/* 300px–400px: באותו קו אבל יותר קטן */
@media (min-width: 300px) and (max-width: 400px) {
  .step-actions {
    margin-top: 24px;
    padding-top: 20px;
    gap: 6px;
  }
  .step-actions .btn-text {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  .step-actions .btn-primary {
    padding: 12px 18px;
    font-size: 0.9rem;
  }
}

/* סיכום הזמנה – יפה ומזמין */
.order-summary {
  margin: 0 0 32px 0;
  min-width: 0;
}

.form-panel--summary {
  background: linear-gradient(180deg, rgba(236, 15, 122, 0.04) 0%, var(--surface) 24%);
  border: 1px solid rgba(236, 15, 122, 0.15);
  border-top: 3px solid var(--primary);
}

.order-summary-heading {
  margin: 0 0 20px 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.order-summary__block {
  padding: 0;
}

.order-summary__product {
  margin: 0 0 20px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-summary__product-img {
  width: 56px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-soft);
}

.order-summary__section {
  margin-bottom: 18px;
}

.order-summary__section:last-of-type {
  margin-bottom: 20px;
}

.order-summary__section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.order-summary__lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-summary__section .order-summary__lines {
  margin-bottom: 0;
}

.order-summary__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.order-summary__line span:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 500;
}

.order-summary__total {
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.order-summary__total-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  gap: 8px;
}

.order-summary__total-line span:first-child {
  min-width: 0;
}

.order-summary__total-line span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.order-summary__total-discount {
  color: var(--primary);
  font-size: 0.88rem;
}
.order-summary__total-discount span:last-child {
  color: var(--primary);
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.order-summary__total-main {
  margin-top: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(236, 15, 122, 0.08) 0%, rgba(134, 9, 69, 0.05) 100%);
  border-radius: var(--radius);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.order-summary__total-main span:first-child {
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  flex: 1 1 auto;
}

.order-summary__total-main span:last-child {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* תיבות אחידות – סיכום הזמנה + פרטים לאישור */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.form-panel:last-of-type {
  margin-bottom: 20px;
}

.form-panel--summary .order-summary {
  margin-bottom: 0;
}

.form-panel--details .form-intro {
  margin-bottom: 20px;
}

.form-panel--details .field:last-of-type {
  margin-bottom: 0;
}

/* כותרת ותיאור מתחת לסיכום – מלא פרטים */
.form-intro {
  margin-bottom: 24px;
}

.form-intro__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.form-intro__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.order-success-msg {
  margin: 20px 0 16px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  display: none;
}

.order-success-msg--visible {
  display: block;
}

.order-success-msg--visible:not(.order-success-msg--error) {
  background: rgba(5, 150, 105, 0.12);
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.3);
}

.order-success-msg--error {
  background: rgba(185, 28, 28, 0.08);
  color: var(--error);
  border: 1px solid rgba(185, 28, 28, 0.25);
}

.footer {
  padding: 12px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

/* מתחת לטאבלט – מסתיר את הלוגו כדי שלא יעלה על הכותרת */
@media (max-width: 767px) {
  .logo {
    display: none !important;
  }
}

/* גודל S – נייד קטן: מונע יציאת תיבות מהמסגרת */
@media (max-width: 600px) {
  .container {
    padding: 0 12px;
  }

  .header-inner {
    padding: 14px 12px 14px 0;
  }

  .sale-flow {
    padding-bottom: 40px;
  }

  .flow-card {
    padding: 20px 16px 28px;
  }

  .step-actions .btn-text {
    margin-inline-start: -24px;
  }

  .product-card {
    padding: 16px;
  }

  .product-grid {
    gap: 16px;
  }

  .progress-steps .step-dot label {
    font-size: 0.65rem;
  }

  .card-row {
    flex-wrap: wrap;
  }

  .input-qty { max-width: 95px; }
  .input-amount { max-width: 115px; }
}

/* נייד קטן מאוד – כפתור חזרה קרוב לקצה */
@media (max-width: 380px) {
  .step-actions .btn-text {
    margin-inline-start: -20px;
  }
}
