/* ============================================================
   order.css — Public order form styles
   Britex ordering system
   ============================================================ */

/* ── Base & shell ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: #0d0d0d;
  color: #f0f0f0;
  font-family: "Cairo", "Tajawal", sans-serif;
  min-height: 100vh;
  margin: 0;
}

/* ── Minimal order navbar ───────────────────────────────────── */
.order-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.order-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.order-nav-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.order-nav-home {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.order-nav-home:hover {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.4);
}

.order-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 16px 80px; /* 72 = 56px nav + 16px gap */
  position: relative;
  z-index: 1;
}

/* ── Animated background ────────────────────────────────────── */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

.wave {
  position: absolute;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 215, 0, 0.08),
    transparent
  );
  animation: waveMove 15s infinite linear;
}
.wave-1 {
  top: 0;
  animation-delay: 0s;
  opacity: 0.3;
}
.wave-2 {
  top: 20%;
  animation-delay: 5s;
  opacity: 0.2;
}
.wave-3 {
  top: 40%;
  animation-delay: 10s;
  opacity: 0.25;
}

@keyframes waveMove {
  0% {
    transform: translateX(-50%) skewY(-3deg);
  }
  100% {
    transform: translateX(0%) skewY(-3deg);
  }
}

.rotating-square {
  position: absolute;
  width: 60px;
  height: 8px;
  background: linear-gradient(90deg, transparent, #ffd700, #ffa500);
  border-radius: 50% 0 0 50%;
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.8),
    0 0 40px rgba(255, 215, 0, 0.4),
    -100px 0 60px rgba(255, 215, 0, 0.2);
  animation: meteorFly 15s infinite ease-in-out;
}
.square-1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
  width: 70px;
}
.square-2 {
  top: 60%;
  right: 15%;
  animation-delay: 5s;
  width: 50px;
}
.square-3 {
  bottom: 20%;
  left: 30%;
  animation-delay: 10s;
  width: 80px;
}
.square-4 {
  top: 40%;
  right: 40%;
  animation-delay: 7s;
  width: 60px;
}

@keyframes meteorFly {
  0% {
    transform: translateX(-200px) translateY(-200px) rotate(45deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(200px) translateY(200px) rotate(45deg);
    opacity: 0;
  }
}

.dots-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

.glow-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 215, 0, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  animation: dotGlow 3s infinite ease-in-out;
}
.dot-1 {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}
.dot-2 {
  top: 25%;
  left: 50%;
  animation-delay: 0.5s;
}
.dot-3 {
  top: 40%;
  left: 80%;
  animation-delay: 1s;
}
.dot-4 {
  top: 55%;
  left: 15%;
  animation-delay: 1.5s;
}
.dot-5 {
  top: 70%;
  left: 60%;
  animation-delay: 2s;
}
.dot-6 {
  top: 85%;
  left: 35%;
  animation-delay: 2.5s;
}
.dot-7 {
  top: 30%;
  left: 70%;
  animation-delay: 0.3s;
}
.dot-8 {
  top: 60%;
  right: 25%;
  animation-delay: 1.2s;
}

@keyframes dotGlow {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(2);
  }
}

.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #ffd700;
  box-shadow: 0 0 10px 2px rgba(255, 215, 0, 0.8);
  animation: shootingStar 3s infinite ease-out;
}
.star-1 {
  top: 10%;
  left: 10%;
  animation-delay: 2s;
}
.star-2 {
  top: 30%;
  left: 60%;
  animation-delay: 5s;
}

@keyframes shootingStar {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(300px, 300px);
    opacity: 0;
  }
}

.gradient-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.25) 0%,
    transparent 70%
  );
  filter: blur(50px);
  animation: circleFloat 12s infinite ease-in-out;
}
.circle-1 {
  width: 400px;
  height: 400px;
  top: -5%;
  left: -5%;
  animation-delay: 0s;
}
.circle-2 {
  width: 350px;
  height: 350px;
  top: 50%;
  right: -5%;
  animation-delay: 4s;
}

@keyframes circleFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(50px, -50px);
  }
  66% {
    transform: translate(-30px, 30px);
  }
}

/* ── Progress bar ───────────────────────────────────────────── */
.order-progress {
  position: sticky;
  top: 56px;
  z-index: 100;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  padding: 18px 28px 48px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
}

/* Track: the horizontal line. overflow:visible so dots poke out */
.progress-track {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin: 0 14px;
  overflow: visible;
}

/* Fill: RTL — grows from right to left */
.progress-fill {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(270deg, #ffd700, #ffa500);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dots container sits over the track line */
.progress-steps {
  position: absolute;
  inset: 0;
  height: 0;
  pointer-events: none;
}

/* Each dot: RTL — positioned with `right:` so step 0 = rightmost */
.progress-step {
  position: absolute;
  top: 0;
  transform: translate(50%, -50%); /* center on track, RTL offset */
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  pointer-events: auto;
}

.progress-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.3s ease;
  /* halo creates visual separation from track line */
  box-shadow: 0 0 0 3px rgba(13, 13, 13, 0.92);
}

.progress-label {
  position: absolute;
  top: 30px;
  white-space: nowrap;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  transition:
    color 0.3s,
    font-weight 0.2s;
  pointer-events: none;
  text-align: center;
}

/* Done state */
.progress-step.done .progress-circle {
  background: #ffd700;
  border-color: #ffd700;
  color: #000;
}
.progress-step.done .progress-label {
  color: rgba(255, 255, 255, 0.5);
}

/* Active state */
.progress-step.active .progress-circle {
  background: #0d0d0d;
  border-color: #ffd700;
  border-width: 3px;
  box-shadow:
    0 0 0 3px rgba(13, 13, 13, 0.92),
    0 0 14px rgba(255, 215, 0, 0.55);
  transform: scale(1.2);
}
.progress-step.active .progress-label {
  color: #ffd700;
  font-weight: 700;
  font-size: 12px;
}

/* Responsive: hide labels on very small screens, show tooltips */
@media (max-width: 480px) {
  .order-progress {
    padding: 14px 16px 40px;
  }
  .progress-label {
    font-size: 9px;
    top: 26px;
  }
  .progress-circle {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
  .progress-step.active .progress-label {
    font-size: 10px;
  }
}

/* ── Floating price bar ─────────────────────────────────────── */
.price-bar {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 40px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  white-space: nowrap;
  transition: bottom 0.35s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.price-bar.visible {
  bottom: 20px;
}

.price-bar-label {
  color: rgba(255, 255, 255, 0.55);
}
.price-bar-value {
  font-weight: 700;
  color: #fff;
  position: relative;
  transition: opacity 0.15s ease;
}
.price-bar-down {
  color: #ffd700;
}
.price-bar-sep {
  color: rgba(255, 255, 255, 0.2);
}

/* ── Recalculating state ───────────────────────────────────── */
/* When .is-loading is set on .price-bar, dim the values and show a
   small spinner next to each one. Cleared as soon as save_step returns. */
.price-bar.is-loading .price-bar-value {
  opacity: 0.55;
}
.price-bar.is-loading .price-bar-value::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-inline-start: 0.4em;
  vertical-align: -0.1em;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: price-bar-spin 0.7s linear infinite;
}
.price-bar.is-loading .price-bar-down::after {
  border-top-color: #ffd700;
}
@keyframes price-bar-spin {
  to { transform: rotate(360deg); }
}

/* ── Order card ─────────────────────────────────────────────── */
.order-card {
  background: rgba(22, 22, 22, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: cardFadeIn 0.3s ease;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.step-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 20px;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 24px 0;
}

/* ── Form controls ──────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label,
.opt-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

.form-ctrl {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #f0f0f0;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.form-ctrl:focus {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.08);
}

.form-ctrl::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

select.form-ctrl {
  cursor: pointer;
  /* Hide native OS arrow (inconsistent on dark bg) and use a custom one */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 16px 12px;
  padding-left: 2.25rem;
}

select.form-ctrl option {
  background: #1a1a1a;
  color: #f0f0f0;
}

textarea.form-ctrl {
  resize: vertical;
  min-height: 80px;
}

.req {
  color: #ff6b6b;
  margin-right: 2px;
}

.field-error {
  font-size: 12px;
  color: #ff6b6b;
  margin-top: 4px;
  min-height: 16px;
}

/* ── Threshold surcharge live badge ─────────────────────────── */
.sc-badge {
  display: inline-block;
  margin-top: 6px;
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
}

.price-chip-surcharge {
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
}

/* ── Products grid ──────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.product-card {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 16px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
  position: relative;
  user-select: none;
}

.product-card:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.04);
}

.product-card.selected {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.08);
}

.product-card.selected::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  background: #ffd700;
  color: #111;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-check {
  display: none;
}

.product-name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-align: center;
}

.product-qty {
  margin-top: 12px;
}

.qty-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-bottom: 6px;
  text-align: center;
}

.qty-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: transparent;
  color: #ffd700;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: rgba(255, 215, 0, 0.15);
}

.qty-display {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  min-width: 24px;
  text-align: center;
}

/* ── Option groups ──────────────────────────────────────────── */
.option-group {
  margin-bottom: 20px;
  transition: opacity 0.2s;
}

/* ── Multi-select ───────────────────────────────────────────── */
.multi-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.multi-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.multi-choice input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ffd700;
  flex-shrink: 0;
}

.multi-choice:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.04);
}

.multi-choice:has(input:checked) {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.06);
}

.multi-choice.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.field-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 5px;
}

/* ── Checkbox option ────────────────────────────────────────── */
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ffd700;
  flex-shrink: 0;
}

/* ── Text-or-file combined field ───────────────────────────── */
.tof-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tof-text-wrap {
  flex: 1 1 0;
  min-width: 0;
}

.tof-text-wrap .form-ctrl {
  width: 100%;
}

.tof-sep {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  padding: 0 2px;
}

.tof-file-wrap {
  flex-shrink: 0;
}

.tof-file-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
  white-space: nowrap;
}

.tof-file-label:hover {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.06);
  color: #ffd700;
}

.tof-file-label.has-file {
  border-color: rgba(255, 215, 0, 0.7);
  color: #ffd700;
}

.tof-file-label input[type="file"] {
  display: none;
}

.tof-preview-img {
  display: block;
  max-width: 180px;
  max-height: 120px;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  object-fit: cover;
  cursor: zoom-in;
}

/* ── File upload ────────────────────────────────────────────── */
.file-upload-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.file-upload-label:hover {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.06);
  color: #ffd700;
}

.file-upload-label input[type="file"] {
  display: none;
}

.file-preview {
  display: block;
  width: 100%;
  max-width: 420px;
  max-height: 320px;
  margin: 0 auto;
  border-radius: 12px;
  border: 2px solid rgba(255, 215, 0, 0.35);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.03);
  cursor: zoom-in;
}

/* ── HEIC upload spinner (inline, inside preview slot) ─────── */
.order-heic-spinner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 0;
}

/* ── Summary step ───────────────────────────────────────────── */
/* ── Summary section card (customer / items / totals share this look) ── */
.summary-section {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.summary-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.summary-section-title i {
  font-size: 14px;
  opacity: 0.85;
}

.summary-section-count {
  margin-inline-start: auto;
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 600;
}

/* Items list */
.summary-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
}

.summary-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.summary-item-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.summary-quantity-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.summary-item-name {
  font-weight: 700;
  font-size: 17px;
  color: #ffd700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-item-price {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  font-weight: 700;
  font-size: 15px;
  padding: 5px 12px;
  border-radius: 8px;
  flex-shrink: 0;
}

.summary-sels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Image preview inside a selection — sits inline next to the field name. */
.summary-image {
  cursor: zoom-in;
  width: auto;
  max-width: 320px;
  max-height: 240px;
  margin: 0;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.summary-image:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 215, 0, 0.6);
}

/* Empty-value placeholder — readable muted color on the dark panel. */
.summary-dash {
  color: rgba(255, 255, 255, 0.45);
}

.summary-empty-msg {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  font-style: italic;
}

/* ── Lightbox ─────────────────────────────────────────────── */
body.scroll-locked { overflow: hidden; }

.summary-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: sumLightboxIn 0.18s ease-out;
}
.summary-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}
.summary-lightbox-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.summary-lightbox-close:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
}
@keyframes sumLightboxIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.summary-sel {
  display: flex;
  gap: 10px;
  font-size: 15px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.summary-sel--vertical {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 15px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  margin-bottom: 16px;
  width: 100%;
}
.summary-sel--vertical .sel-name {
  margin-bottom: 12px;
  width: 100%;
  color: #ffd700; /* Make label more prominent when vertical */
  font-size: 16px;
}
.summary-sel--vertical .sel-val {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.summary-sel--vertical .summary-image {
  width: 220px;
  height: 220px;
  border-width: 2px;
  border-color: rgba(255, 215, 0, 0.2);
  max-width: 100%;
}

.sel-name {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 2px;
}

.sel-val {
  color: #fff;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.price-chip {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
}

/* ── Price summary ──────────────────────────────────────────── */
.price-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.price-row:last-child {
  border-bottom: none;
}

.price-row strong {
  color: #fff;
  font-weight: 700;
}

.price-row.accent {
  background: rgba(255, 215, 0, 0.06);
}

.price-row.accent strong {
  color: #ffd700;
  font-size: 16px;
}

.price-row.muted {
  opacity: 0.7;
}

/* ── LTR inputs (phone, numbers) in RTL context ─────────────── */
.ltr-input {
  direction: ltr;
  text-align: left;
}
.rtl-input {
  direction: rtl;
  text-align: right;
}

/* ── Number inputs: right-aligned, LTR typing, no spinners ──── */
input[type="number"].form-ctrl {
  direction: ltr;
  text-align: right;
  -moz-appearance: textfield;
}
input[type="number"].form-ctrl::-webkit-inner-spin-button,
input[type="number"].form-ctrl::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ltr-text {
  direction: ltr;
  unicode-bidi: embed;
}

/* ── Product card inner ─────────────────────────────────────── */
.product-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* ── Payment step ───────────────────────────────────────────── */
.payment-info-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
}

/* Amount banner */
.pay-amount-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255, 215, 0, 0.07);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}
.pay-amount-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.pay-amount-value {
  font-size: 32px;
  font-weight: 800;
  color: #ffd700;
  line-height: 1.1;
}
.pay-amount-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* Payment methods grid: each method is a card with QR + number */
.pay-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.pay-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}
.pay-method-card:hover {
  border-color: rgba(255, 215, 0, 0.25);
}
.pay-method-card.selected {
  border-color: #ffd700 !important;
  background: rgba(255, 215, 0, 0.08) !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.pay-method-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pay-method-icon {
  font-size: 18px;
  color: #ffd700;
}

.pay-method-name {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.pay-qr {
  display: none;
  justify-content: center;
}
.pay-method-card.selected .pay-qr {
  display: flex;
}

.pay-qr-img {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  object-fit: contain;
  background: #fff;
  padding: 8px;
}

.pay-number {
  all: unset;
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  direction: ltr;
  transition:
    background 0.15s,
    color 0.15s;
  width: 100%;
  justify-content: center;
}
.pay-method-card.selected .pay-number {
  display: flex;
}
.pay-number:hover {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
}
.pay-number i {
  font-size: 13px;
  opacity: 0.5;
}

/* Important notes / warning box */
.pay-notes {
  background: rgba(255, 165, 0, 0.06);
  border: 1px solid rgba(255, 165, 0, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.pay-notes-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffa500;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pay-notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pay-notes-list li {
  position: relative;
  padding: 5px 0 5px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

.pay-notes-list li::before {
  content: "•";
  position: absolute;
  right: 0;
  color: #ffa500;
  font-weight: 700;
}

/* RTL: bullet on right side */
[dir="rtl"] .pay-notes-list li {
  padding: 5px 16px 5px 0;
}

.field-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin: 4px 0 10px;
}

@media (max-width: 520px) {
  .pay-methods-grid {
    grid-template-columns: 1fr;
  }
  .pay-qr-img {
    width: 130px;
    height: 130px;
  }
}

.wa-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366;
  color: #fff;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.wa-link:hover {
  background: #1ebe5d;
  color: #fff;
}

/* ── Step navigation ────────────────────────────────────────── */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

.btn-next,
.btn-back,
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
}

.btn-next,
.btn-submit {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #111;
  box-shadow: 0 4px 16px rgba(255, 165, 0, 0.3);
}

.btn-next:hover,
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.btn-back {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-next:disabled,
.btn-back:disabled,
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Resume card (session restore prompt) ───────────────────── */
.resume-card {
  text-align: center;
}

.resume-icon {
  font-size: 2.5rem;
  color: #ffd700;
  margin-bottom: 12px;
}

.resume-details {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 18px 0;
  text-align: right;
}

.resume-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.resume-row:last-child {
  border-bottom: none;
}

.resume-row strong {
  color: #f0f0f0;
  font-weight: 600;
  max-width: 65%;
  text-align: left;
}

.resume-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #111;
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 165, 0, 0.3);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.btn-resume:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.btn-start-fresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 11px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.btn-start-fresh:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ── Confirmation step ──────────────────────────────────────── */
.confirm-card {
  text-align: center;
}

.confirm-icon {
  font-size: 4rem;
  color: #4caf50;
  margin-bottom: 14px;
  line-height: 1;
}

.confirm-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.confirm-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 24px;
}

.confirm-num-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  padding: 14px 22px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.confirm-num-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.confirm-num-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 0.04em;
}

.confirm-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.7);
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  line-height: 1;
}

.confirm-copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.confirm-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 24px;
}

/* legacy aliases (kept for back-compat) */
.confirm-num {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.confirm-num strong {
  color: #ffd700;
  font-size: 1.25rem;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  border-radius: 10px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-wa:hover {
  background: #1ebe5d;
  color: #fff;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-home:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ── Toast notifications ────────────────────────────────────── */
.order-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition:
    opacity 0.25s,
    transform 0.25s;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.order-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.order-toast-success {
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
}

.order-toast-error {
  background: rgba(244, 67, 54, 0.9);
  color: #fff;
}

/* ── Orders closed message ──────────────────────────────────── */
.order-closed-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 16px;
  position: relative;
  z-index: 1;
}

.closed-card {
  background: rgba(22, 22, 22, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 18px;
  padding: 50px 40px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  color: #fff;
}

.closed-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 16px 0 10px;
}

.closed-card p {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 24px;
}

.btn-go-home {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #111;
  font-weight: 700;
  border-radius: 10px;
  padding: 11px 28px;
  text-decoration: none;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.btn-go-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
  color: #111;
}

/* ── Step loading state ─────────────────────────────────────── */
.step-loading {
  color: rgba(255, 255, 255, 0.5);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .order-shell {
    padding: 68px 10px 100px;
  }

  .order-card {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr 1fr;
  }

  .step-title {
    font-size: 1.25rem;
  }

  .btn-next,
  .btn-back,
  .btn-submit {
    padding: 10px 18px;
    font-size: 13px;
  }

  .price-bar {
    font-size: 12px;
    padding: 8px 16px;
    gap: 6px;
  }

  .progress-step {
    font-size: 10px;
  }

  .confirm-actions {
    flex-direction: column;
    align-items: center;
  }

  .summary-item-head {
    flex-wrap: wrap;
  }
}

@media (max-width: 400px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}
