/* Photofun-style print ordering system - blue, bouncy, large touch targets */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #0066ff;
  --blue-600: #0052cc;
  --blue-700: #003d99;
  --blue-800: #002966;
  --blue-900: #001a40;

  --ink-900: #0a1628;
  --ink-700: #2c3e5c;
  --ink-500: #5a6c87;
  --ink-300: #94a3b8;
  --ink-200: #cbd5e1;
  --ink-100: #e2e8f0;
  --ink-50: #f1f5f9;

  --bg: #f8fbff;
  --surface: #ffffff;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --whatsapp: #25d366;
  --whatsapp-dark: #128c7e;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --btn-h: 64px;
  --shadow-sm: 0 2px 8px rgba(0, 102, 255, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 102, 255, 0.10);
  --shadow-lg: 0 20px 48px rgba(0, 102, 255, 0.16);
  --shadow-blue: 0 12px 32px rgba(0, 102, 255, 0.30);

  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Heebo', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink-900);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* App shell ---------------------------------------------- */
.app {
  min-height: 100vh;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 30%, #f8fbff 100%);
  padding-bottom: 140px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-100);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar .logo {
  font-weight: 900;
  font-size: 26px;
  color: var(--blue-600);
  letter-spacing: -0.02em;
}
.topbar .logo .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-500);
  margin-inline-start: 6px;
  vertical-align: middle;
}
.topbar .back-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-50);
  display: grid;
  place-items: center;
  color: var(--blue-600);
  transition: all 0.2s var(--bounce);
}
.topbar .back-btn:hover { background: var(--blue-100); transform: scale(1.06); }
.topbar .back-btn:active { transform: scale(0.92); }
.topbar .spacer { flex: 1; }
.topbar .help {
  font-size: 14px;
  color: var(--ink-500);
  font-weight: 500;
}

/* Stepper — Modern Pill ------------------------------------- */
.stepper {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 20px 0;
}
.stepper-modern {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}
.sm-track {
  position: absolute;
  inset: 50% 16px 0 16px;
  height: 6px;
  transform: translateY(-50%);
  background: var(--ink-100);
  border-radius: 999px;
  overflow: hidden;
}
.sm-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  border-radius: 999px;
  transition: width 0.65s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 0 18px rgba(0, 102, 255, 0.4);
}
.sm-dots {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 2;
}
.sm-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--ink-200);
  color: var(--ink-400);
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  position: relative;
  transition: all 0.4s var(--bounce);
}
.sm-dot.done {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: white;
  transform: scale(0.92);
}
.sm-dot.current {
  background: var(--blue-500);
  border-color: white;
  color: white;
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(0,102,255,0.18), 0 6px 18px rgba(0,102,255,0.4);
}
.sm-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--blue-500);
  animation: sm-pulse 1.6s ease-out infinite;
}
@keyframes sm-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
.sm-meta {
  text-align: center;
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 600;
  margin-top: 10px;
}

/* Hide old stepper styles */
.stepper-row, .progress-bar { display: none !important; }
.app[data-progress="bar"] .stepper-modern,
.app[data-progress="dots"] .stepper-modern { display: flex; }

@media (max-width: 600px) {
  .stepper { padding: 12px 14px 0; max-width: 100%; }
  .stepper-modern { height: 36px; }
  .sm-dot { width: 26px; height: 26px; font-size: 11px; border-width: 2px; }
  .sm-dot.current { transform: scale(1.18); }
  .sm-track { inset: 50% 13px 0 13px; height: 5px; }
  .sm-meta { font-size: 12px; margin-top: 6px; }
}
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  position: relative;
}
.step .ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--ink-200);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-300);
  transition: all 0.4s var(--bounce);
}
.step.done .ring {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}
.step.current .ring {
  background: white;
  border-color: var(--blue-500);
  color: var(--blue-600);
  box-shadow: 0 0 0 6px rgba(0, 102, 255, 0.12), 0 4px 12px rgba(0, 102, 255, 0.2);
  animation: stepPulse 2s ease-in-out infinite;
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(0, 102, 255, 0.12), 0 4px 12px rgba(0, 102, 255, 0.2); }
  50% { box-shadow: 0 0 0 10px rgba(0, 102, 255, 0.06), 0 4px 12px rgba(0, 102, 255, 0.2); }
}
.step .lbl {
  display: none;
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
  white-space: nowrap;
}
.step.done .lbl, .step.current .lbl { color: var(--blue-600); font-weight: 700; }

.step-line {
  flex: 1;
  height: 3px;
  background: var(--ink-100);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}
.step-line .fill {
  position: absolute;
  inset: 0;
  background: var(--blue-500);
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.6s var(--smooth);
}
.step-line.filled .fill { transform: scaleX(1); }

/* Tweaks pin progress styles */
.app[data-progress="bar"] .stepper-row { display: none; }
.app[data-progress="bar"] .stepper { padding-bottom: 0; }
.app[data-progress="bar"] .progress-bar { display: block; }
.progress-bar { display: none; max-width: 1100px; margin: 0 auto; padding: 8px 20px 0; }
.progress-bar .track { height: 10px; background: var(--ink-100); border-radius: 6px; overflow: hidden; }
.progress-bar .track .fill { height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--blue-400)); border-radius: 6px; transition: width 0.5s var(--smooth); }
.progress-bar .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-500); margin-top: 8px; font-weight: 600; }

.app[data-progress="dots"] .stepper-row { gap: 12px; justify-content: center; }
.app[data-progress="dots"] .step .ring { width: 14px; height: 14px; font-size: 0; border-width: 0; background: var(--ink-200); }
.app[data-progress="dots"] .step.done .ring { width: 14px; height: 14px; }
.app[data-progress="dots"] .step.current .ring { width: 36px; border-radius: 8px; }
.app[data-progress="dots"] .step .lbl { display: none; }
.app[data-progress="dots"] .step-line { display: none; }

/* Card / Section ------------------------------------------ */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
}
.section-title {
  font-size: 28px;
  font-weight: 800;
  margin: 8px 0 4px;
  letter-spacing: -0.02em;
}
.section-sub {
  font-size: 16px;
  color: var(--ink-500);
  margin: 0 0 24px;
}

/* Tweakable corner radius */
.app[data-corners="sharp"] { --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 10px; }
.app[data-corners="rounded"] { --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-xl: 32px; }
.app[data-corners="pill"] { --r-sm: 16px; --r-md: 24px; --r-lg: 32px; --r-xl: 999px; }

/* Tweakable button size */
.app[data-btn-size="sm"] { --btn-h: 52px; }
.app[data-btn-size="md"] { --btn-h: 64px; }
.app[data-btn-size="lg"] { --btn-h: 76px; }

/* ProductCard -------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
@media (max-width: 860px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--bounce);
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  opacity: 0;
  transition: opacity 0.3s var(--smooth);
  z-index: 0;
}
.product-card > * { position: relative; z-index: 1; }
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}
.product-card:active { transform: translateY(-2px) scale(0.98); }
.product-card.selected {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-blue);
}
.product-card .icon-wrap {
  width: 110px;
  height: 110px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--blue-50), #fff);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  transition: transform 0.4s var(--bounce);
}
.product-card:hover .icon-wrap { transform: scale(1.08) rotate(-3deg); }
.product-card .title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-900);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.product-card .desc {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.5;
  margin: 0;
}
.product-card .badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  background: var(--blue-500);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  z-index: 2;
}

/* Big buttons -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 32px;
  border-radius: var(--r-md);
  font-size: 18px;
  font-weight: 700;
  transition: all 0.2s var(--bounce);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 40px rgba(0, 102, 255, 0.4); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }

.btn-ghost {
  background: white;
  color: var(--blue-600);
  border: 2px solid var(--ink-100);
}
.btn-ghost:hover { border-color: var(--blue-300); background: var(--blue-50); }

.btn-whatsapp {
  background: linear-gradient(135deg, var(--whatsapp), var(--whatsapp-dark));
  color: white;
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.35);
  width: 100%;
  font-size: 20px;
}
.btn-whatsapp:hover { transform: translateY(-2px) scale(1.01); }

/* Bottom CTA bar */
.cta-bar {
  position: fixed;
  bottom: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--ink-100);
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 40;
}
.cta-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
}
.cta-bar .total {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cta-bar .total .lbl { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.cta-bar .total .val { font-size: 28px; font-weight: 900; color: var(--blue-600); letter-spacing: -0.02em; }
.cta-bar .btn { flex-shrink: 0; }
@media (max-width: 600px) {
  .cta-bar .btn { padding: 0 22px; font-size: 16px; }
  .cta-bar .total .val { font-size: 22px; }
}

/* Tabs ---------------------------------------------------- */
.tabs {
  display: flex;
  gap: 8px;
  background: white;
  padding: 6px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-500);
  white-space: nowrap;
  transition: all 0.25s var(--bounce);
}
.tab.active {
  background: var(--blue-500);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}
.tab:not(.active):hover { background: var(--blue-50); color: var(--blue-600); }

/* Option cards (paper, border, fit/fill) ------------------ */
.option-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .option-row { grid-template-columns: 1fr; } }
.option-card {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s var(--bounce);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.option-card:hover { border-color: var(--blue-300); transform: translateY(-2px); }
.option-card.selected {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.18);
}
.option-card .preview {
  width: 100%;
  height: 84px;
  background: var(--ink-50);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.option-card .lbl-main { font-weight: 800; font-size: 16px; }
.option-card .lbl-sub { font-size: 13px; color: var(--ink-500); }

/* Size grid ---------------------------------------------- */
.size-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 700px) { .size-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .size-grid { grid-template-columns: repeat(2, 1fr); } }
.size-card {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s var(--bounce);
}
.size-card:hover { border-color: var(--blue-300); transform: translateY(-2px); }
.size-card.selected {
  border-color: var(--blue-500);
  background: var(--blue-500);
  color: white;
  box-shadow: var(--shadow-blue);
  transform: translateY(-2px) scale(1.04);
}
.size-card .dim { font-size: 18px; font-weight: 800; }
.size-card .price { font-size: 14px; opacity: 0.8; margin-top: 4px; }

/* Quantity stepper --------------------------------------- */
.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: var(--r-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--ink-100);
}
.qty-row .label { flex: 1; font-weight: 700; font-size: 16px; }
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--blue-50);
  border-radius: var(--r-pill);
  padding: 6px;
}
.qty-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  color: var(--blue-600);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.12);
  transition: all 0.2s var(--bounce);
}
.qty-btn:hover { background: var(--blue-500); color: white; transform: scale(1.08); }
.qty-btn:active { transform: scale(0.92); }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-val { min-width: 36px; text-align: center; font-size: 22px; font-weight: 800; color: var(--blue-700); }

/* Image-line item (multiple images) ---------------------- */
.image-line {
  background: white;
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
  margin-bottom: 14px;
  position: relative;
  animation: lineEnter 0.4s var(--bounce);
}
@keyframes lineEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.image-line .ln-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.image-line .ln-title { font-weight: 800; font-size: 18px; }
.image-line .remove {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fef2f2;
  color: var(--danger);
  display: grid;
  place-items: center;
  transition: all 0.2s var(--bounce);
}
.image-line .remove:hover { background: var(--danger); color: white; transform: scale(1.08) rotate(90deg); }
.add-image-btn {
  width: 100%;
  padding: 18px;
  border: 2px dashed var(--blue-300);
  background: var(--blue-50);
  border-radius: var(--r-md);
  color: var(--blue-600);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s var(--bounce);
}
.add-image-btn:hover { background: var(--blue-100); border-color: var(--blue-500); transform: translateY(-2px); }

/* Upload zone -------------------------------------------- */
.upload-zone {
  border: 3px dashed var(--blue-300);
  background: linear-gradient(135deg, #fff, var(--blue-50));
  border-radius: var(--r-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--smooth);
  position: relative;
}
.upload-zone:hover, .upload-zone.drag {
  border-color: var(--blue-500);
  background: var(--blue-50);
  transform: scale(1.01);
}
.upload-zone .icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--blue-500);
  color: white;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-blue);
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.upload-zone h3 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.upload-zone p { font-size: 15px; color: var(--ink-500); margin: 0; }

.upload-stats {
  background: white;
  border-radius: var(--r-md);
  padding: 16px 20px;
  display: flex;
  gap: 24px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
  flex-wrap: wrap;
}
.stat { display: flex; align-items: center; gap: 10px; }
.stat .pill {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: 14px;
}
.stat.done .pill { background: #dcfce7; color: var(--success); }
.stat.upload .pill { background: var(--blue-100); color: var(--blue-700); }
.stat.fail .pill { background: #fee2e2; color: var(--danger); }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.thumb {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: var(--ink-100);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  animation: thumbEnter 0.4s var(--bounce);
}
@keyframes thumbEnter {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .progress-ring {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
}
.thumb .check {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 8px rgba(22, 163, 74, 0.3);
  animation: pop 0.4s var(--bounce);
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.thumb .x {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 14px;
}
.thumb:hover .x { opacity: 1; }
.thumb .filename {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 24px 8px 8px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Form ---------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field {
  display: flex;
  flex-direction: column;
  position: relative;
}
.field label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink-700);
}
.field input, .field textarea, .field select {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-size: 17px;
  color: var(--ink-900);
  transition: all 0.2s var(--smooth);
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.12);
}
.field textarea { resize: vertical; min-height: 100px; }

/* Delivery card ------------------------------------------- */
.delivery-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .delivery-row { grid-template-columns: 1fr; } }
.delivery-card {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s var(--bounce);
  display: flex;
  align-items: center;
  gap: 16px;
}
.delivery-card:hover { border-color: var(--blue-300); }
.delivery-card.selected { border-color: var(--blue-500); background: var(--blue-50); box-shadow: 0 4px 16px rgba(0, 102, 255, 0.18); }
.delivery-card .icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--blue-100);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.delivery-card.selected .icon { background: var(--blue-500); color: white; }
.delivery-card .info { flex: 1; }
.delivery-card .name { font-weight: 800; font-size: 17px; }
.delivery-card .sub { font-size: 13px; color: var(--ink-500); margin-top: 2px; }
.delivery-card .price { font-weight: 800; color: var(--blue-600); font-size: 18px; }

/* Order bump --------------------------------------------- */
.bump-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 540px) { .bump-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.bump-card {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all 0.25s var(--bounce);
  position: relative;
  cursor: pointer;
  text-align: right;
  padding: 0;
  width: 100%;
  font-family: inherit;
}
.bump-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.bump-card.added { border-color: var(--success); box-shadow: 0 8px 24px rgba(22, 163, 74, 0.18); background: #f0fdf4; }
.bump-card .added-check {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: grid;
  place-items: center;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
  animation: pop 0.4s var(--bounce);
}
.add-pill {
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bump-card.added .add-pill, .add-pill.is-added { background: var(--success); color: white; }
.bump-card .img {
  height: 140px;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
  display: grid;
  place-items: center;
  color: var(--blue-700);
  position: relative;
}
.bump-card .body { padding: 16px; }
.bump-card .name { font-weight: 800; font-size: 17px; margin: 0 0 4px; }
.bump-card .desc { font-size: 13px; color: var(--ink-500); margin: 0 0 12px; line-height: 1.4; }
.bump-card .foot { display: flex; justify-content: space-between; align-items: center; }
.bump-card .price { font-weight: 900; font-size: 20px; color: var(--blue-600); }
.bump-card .add {
  background: var(--blue-500);
  color: white;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s var(--bounce);
}
.bump-card .add:hover { background: var(--blue-600); transform: scale(1.05); }
.bump-card.added .add { background: var(--success); }
.bump-card .save-tag {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: var(--warning);
  color: white;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  z-index: 2;
}

/* Summary ------------------------------------------------ */
.summary-card {
  background: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
  overflow: hidden;
  margin-bottom: 14px;
}
.summary-section {
  padding: 18px 20px;
  border-bottom: 1px solid var(--ink-100);
}
.summary-section:last-child { border-bottom: none; }
.summary-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 16px;
}
.summary-row.total {
  font-weight: 900;
  font-size: 24px;
  color: var(--blue-600);
  padding-top: 12px;
  margin-top: 8px;
}

/* Confetti / success --------------------------------------- */
.success-screen {
  text-align: center;
  padding: 60px 20px;
}
.success-screen .check-big {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #22c55e);
  color: white;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  box-shadow: 0 20px 48px rgba(22, 163, 74, 0.35);
  animation: successPop 0.6s var(--bounce);
}
@keyframes successPop {
  0% { transform: scale(0) rotate(-180deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Slide transitions ---------------------------------------- */
.screen { animation: slideEnter 0.4s var(--smooth); }
@keyframes slideEnter {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Mobile spacing */
@media (max-width: 600px) {
  .section-title { font-size: 22px; }
  .section-sub { font-size: 14px; margin-bottom: 16px; }
  .stepper { padding: 12px 14px 4px; }
  .stepper-row { gap: 4px; margin-bottom: 14px; }
  .step .ring { width: 28px; height: 28px; font-size: 13px; border-width: 2px; }
  .step-line { height: 2px; }
  .progress-bar { padding: 4px 14px 0; }
  .progress-bar .meta { font-size: 12px; margin-top: 5px; }
  .progress-bar .track { height: 7px; }
  .bump-card .body { padding: 12px; }
  .bump-card .name { font-size: 14px; }
  .bump-card .desc { font-size: 11px; margin-bottom: 8px; }
  .bump-card .price { font-size: 16px; }
  .bump-card .img { height: 100px; }
  .bump-card .save-tag { font-size: 10px; padding: 4px 8px; }
  .section { padding: 12px 16px; }
}

/* ===== Step Transition Celebration ===== */
.step-transition {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.step-transition-card {
  background: white;
  border-radius: var(--r-xl);
  padding: 40px 56px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  animation: cardPop 0.5s var(--bounce);
  position: relative;
  overflow: hidden;
}
@keyframes cardPop {
  0% { transform: scale(0.4) rotate(-8deg); opacity: 0; }
  60% { transform: scale(1.06) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.step-transition-card .big-emoji {
  font-size: 80px;
  line-height: 1;
  animation: bounceEmoji 1s var(--bounce) infinite alternate;
  margin-bottom: 12px;
}
@keyframes bounceEmoji {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-12px) scale(1.1); }
}
.step-transition-card .trans-label {
  font-size: 28px;
  font-weight: 900;
  color: var(--blue-600);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.step-transition-card .trans-sub {
  font-size: 16px;
  color: var(--ink-500);
  font-weight: 600;
}
.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.confetti span {
  position: absolute;
  top: -10px;
  left: calc(var(--i) * 7%);
  width: 10px;
  height: 14px;
  background: var(--c);
  border-radius: 2px;
  animation: confettiFall 1.4s ease-out forwards;
  animation-delay: calc(var(--i) * 40ms);
  transform: rotate(0deg);
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(360px) rotate(720deg); opacity: 0; }
}

/* ===== Image-line: collapsed summary + active state ===== */
.image-line.collapsed {
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.25s var(--bounce);
}
.image-line.collapsed:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.image-line.collapsed .ln-body { display: none; }
.image-line.collapsed .ln-head { margin-bottom: 0; }
.image-line .summary-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.image-line .chip {
  font-size: 12px;
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.image-line .chip.qty { background: var(--blue-500); color: white; }
.image-line .chip.price { background: #fef3c7; color: #92400e; }
.image-line .ln-head .edit-btn {
  background: var(--blue-50);
  color: var(--blue-600);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s var(--bounce);
}
.image-line .ln-head .edit-btn:hover { background: var(--blue-100); }
.image-line.expanded {
  border: 2px solid var(--blue-500);
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.15);
}
.image-line .ln-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,102,255,0.25);
}
.image-line .ln-head { display: flex; align-items: center; gap: 14px; }
.image-line .ln-info { flex: 1; min-width: 0; }
.image-line .ln-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Add-image enhanced */
.add-image-btn {
  position: relative;
  overflow: hidden;
}
.add-image-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(0,102,255,0.1) 50%, transparent 70%);
  transform: translateX(100%);
  transition: transform 0.6s;
}
.add-image-btn:hover::after { transform: translateX(-100%); }
.add-image-btn .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--blue-500);
  border-radius: 50%;
  animation: pulseDot 1.5s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; }
}
.add-image-success {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border: 2px solid var(--success);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #14532d;
  font-weight: 700;
  animation: slideIn 0.4s var(--bounce);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.add-image-success .ico {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.image-counter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--blue-50), white);
  border: 1px solid var(--blue-100);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}
.image-counter-bar .count {
  font-weight: 800;
  color: var(--blue-700);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.image-counter-bar .count .num {
  background: var(--blue-500);
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.image-counter-bar .hint {
  font-size: 13px;
  color: var(--ink-500);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.92);
  display: grid;
  place-items: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
  padding: 40px 20px;
}
.lightbox-inner {
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: cardPop 0.4s var(--bounce);
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
}
.lightbox-caption {
  color: white;
  font-weight: 600;
  font-size: 15px;
}
.lightbox-info {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 12px;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 280px;
  max-width: 480px;
}
.lightbox-num {
  font-weight: 800;
  font-size: 14px;
  color: var(--blue-300);
  letter-spacing: 0.05em;
}
.lightbox-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
  font-size: 13px;
}
.lspec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
}
.lspec span { color: rgba(255,255,255,0.55); font-size: 11px; font-weight: 500; }
.lspec strong { color: white; font-weight: 700; font-size: 14px; }
@media (max-width: 480px) {
  .lightbox-specs { grid-template-columns: repeat(2, 1fr); }
}
.lightbox-close {
  position: fixed;
  top: 20px;
  inset-inline-end: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  color: var(--ink-900);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 201;
  transition: all 0.2s var(--bounce);
}
.lightbox-close:hover { transform: scale(1.08) rotate(90deg); background: var(--blue-500); color: white; }

.thumb { cursor: pointer; }
.thumb .zoom-hint {
  position: absolute;
  inset: 0;
  background: rgba(0, 102, 255, 0.65);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s;
}
.thumb:hover .zoom-hint { opacity: 1; }

/* Sticky done button inside expanded image-line */
.ln-done-btn {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-blue);
  transition: all 0.2s var(--bounce);
}
.ln-done-btn:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 16px 40px rgba(0, 102, 255, 0.4); }
.ln-done-btn:active { transform: translateY(0) scale(0.98); }

/* Notes toggle (Screen 4) */
.notes-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--blue-50) 0%, white 100%);
  border: 2px dashed var(--blue-300);
  border-radius: var(--r-md);
  color: var(--blue-700);
  text-align: start;
  cursor: pointer;
  transition: all 0.2s var(--bounce);
  font-family: inherit;
}
.notes-toggle:hover {
  background: white;
  border-color: var(--blue-500);
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.1);
}
.notes-toggle-label { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.notes-toggle-label .ttl { font-weight: 700; font-size: 16px; color: var(--ink-900); }
.notes-toggle-label .sub { font-weight: 500; font-size: 13px; color: var(--ink-500); }
.notes-toggle-plus {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue-500);
  color: white;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}

.notes-open {
  background: white;
  border: 2px solid var(--blue-200);
  border-radius: var(--r-md);
  overflow: hidden;
  animation: slideIn 0.3s var(--bounce);
}
.notes-open-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--blue-50);
  border-bottom: 1px solid var(--blue-100);
}
.notes-open-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--blue-700);
  font-size: 15px;
}
.notes-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-600);
  cursor: pointer;
  transition: all 0.18s;
}
.notes-close-btn:hover { background: #fee2e2; border-color: #fecaca; color: #dc2626; }
.notes-textarea {
  width: 100%;
  border: none;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  min-height: 90px;
  outline: none;
  background: white;
  color: var(--ink-900);
}
.notes-textarea::placeholder { color: var(--ink-400); }

/* Per-image summary cards (Screen 6) */
.image-summary-card {
  background: var(--blue-50);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--blue-100);
}
.isc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.isc-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue-500);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}
.isc-title { font-weight: 800; flex: 1; }
.isc-price { font-weight: 800; color: var(--blue-700); font-size: 17px; }
.isc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  font-size: 13px;
}
.isc-cell { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed rgba(0,102,255,0.15); }
.isc-cell span { color: var(--ink-500); }
.isc-cell strong { color: var(--ink-900); font-weight: 700; }
@media (max-width: 480px) {
  .isc-grid { grid-template-columns: 1fr; gap: 4px; }
}

/* Done dialog */
.done-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: dd-fade 0.2s ease-out;
}
@keyframes dd-fade { from { opacity: 0; } to { opacity: 1; } }
.done-dialog {
  background: white;
  border-radius: var(--r-lg);
  padding: 32px 24px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  animation: dd-pop 0.45s var(--bounce);
}
@keyframes dd-pop {
  0% { transform: scale(0.7) translateY(40px); opacity: 0; }
  60% { transform: scale(1.04) translateY(-6px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.dd-emoji {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
  animation: dd-bounce 0.8s var(--bounce);
}
@keyframes dd-bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-12px) rotate(-8deg); }
  60% { transform: translateY(-4px) rotate(8deg); }
}
.dd-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink-900);
  margin: 0 0 6px;
}
.dd-sub {
  font-size: 16px;
  color: var(--ink-500);
  margin: 0 0 24px;
}
.dd-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dd-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  font-family: inherit;
  text-align: start;
  transition: all 0.2s var(--bounce);
  cursor: pointer;
  border: 2px solid transparent;
}
.dd-btn-title { font-size: 17px; font-weight: 700; }
.dd-btn-sub { font-size: 13px; opacity: 0.75; margin-top: 2px; }
.dd-btn-add {
  background: var(--blue-50);
  color: var(--blue-700);
  border-color: var(--blue-200);
}
.dd-btn-add:hover {
  background: var(--blue-100);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.18);
}
.dd-btn-next {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  justify-content: space-between;
}
.dd-btn-next:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-blue);
}
.dd-btn:active { transform: translateY(0) scale(0.98); }
