* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #172033;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
input, textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fbfdff;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input:focus, textarea:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .15);
}
textarea { resize: vertical; }

.container { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.required { color: #dc2626; }

/* ── Sales Header ── */
.sales-header {
  background: linear-gradient(135deg, #064e3b 0%, #16a34a 100%);
  color: white;
  text-align: center;
  padding: 32px 16px 28px;
}
.badge-free {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-weight: 900;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 14px;
}
.product-name {
  font-size: clamp(1.8rem, 7vw, 3.2rem);
  letter-spacing: -.04em;
  line-height: 1.05;
  font-weight: 900;
  margin-bottom: 8px;
}
.tagline { opacity: .85; font-size: .95rem; margin-bottom: 10px; }
.rating { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .88rem; }
.stars { color: #facc15; letter-spacing: 2px; }
.rating-text { opacity: .75; }

/* ── Urgent Bar ── */
.urgent-bar {
  background: #fef2f2;
  color: #991b1b;
  text-align: center;
  font-weight: 850;
  font-size: .85rem;
  padding: 10px;
  margin: 0 -16px 16px;
}

/* ── Steps ── */
.step-section { margin-bottom: 20px; }
.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: #16a34a;
  color: white;
  border-radius: 999px;
  font-weight: 900;
  font-size: .85rem;
  flex-shrink: 0;
}
.step-head h2 { font-size: 1.15rem; }

/* ── Package Cards ── */
.package-grid { display: grid; gap: 12px; }
.package-card {
  position: relative;
  display: block;
  background: white;
  border-radius: 18px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.package-card:hover { transform: translateY(-2px); }
.package-card:has(.pkg-radio:checked) {
  border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(22,163,74,.2);
}
.package-card.best:has(.pkg-radio:checked) {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,.25);
}
.pkg-radio { position: absolute; opacity: 0; pointer-events: none; }
.pkg-body { padding: 18px; display: grid; gap: 6px; }
.pkg-badge {
  padding: 6px 14px;
  font-weight: 900;
  font-size: .75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.pkg-badge.promo { background: #fef3c7; color: #92400e; }
.pkg-badge.popular { background: #dbeafe; color: #1e40af; }
.pkg-badge.best { background: #fef3c7; color: #92400e; }
.pkg-title { font-size: 1.1rem; font-weight: 850; }
.pkg-qty { color: #6b7280; font-size: .9rem; }
.pkg-price { display: flex; align-items: baseline; gap: 8px; }
.price-current { font-size: 1.65rem; font-weight: 900; color: #172033; }
.package-card.best .price-current { color: #b45309; }
.price-original { font-size: .95rem; color: #9ca3af; text-decoration: line-through; }
.pkg-saving { font-size: .82rem; font-weight: 850; color: #16a34a; }
.package-card.best .pkg-saving { color: #b45309; }
.pkg-gift-label { font-size: .85rem; color: #6b7280; }
.pkg-gift-label strong { color: #172033; }
.hidden { visibility: hidden; }

/* ── Quantity ── */
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  overflow: hidden;
}
.qty-btn {
  border: 0;
  background: #f3f4f6;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #374151;
  transition: background .16s;
}
.qty-btn:active { background: #d1d5db; }
#qtyInput {
  width: 72px;
  text-align: center;
  border: 0;
  border-inline: 1px solid #d1d5db;
  border-radius: 0;
  font-weight: 800;
  font-size: 1.15rem;
  height: 48px;
  padding: 0;
  background: white;
}

/* ── Customer Form ── */
#customerForm { display: grid; gap: 14px; }
#customerForm label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-weight: 750;
  font-size: .9rem;
}
#custAddress { min-height: 90px; }

/* ── Order Summary Panel ── */
.order-summary {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  margin-bottom: 20px;
  position: sticky;
  top: 12px;
}
.summary-head {
  background: #064e3b;
  color: white;
  font-weight: 900;
  padding: 16px;
  border-radius: 20px 20px 0 0;
  font-size: 1rem;
}
.summary-body { padding: 16px; display: grid; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.summary-row span:last-child { font-weight: 850; text-align: right; }
.summary-row.total {
  border-top: 2px solid #e5e7eb;
  margin-top: 6px;
  padding-top: 12px;
  font-size: 1.3rem;
}
.summary-row.total span:last-child { color: #16a34a; }
.btn-checkout {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  font-weight: 900;
  font-size: 1.2rem;
  padding: 18px;
  letter-spacing: .02em;
  transition: transform .16s, box-shadow .16s;
}
.btn-checkout:active { transform: scale(.97); }
.btn-checkout.compact { padding: 14px; font-size: 1rem; }
.secure-badge { text-align: center; padding: 10px 16px 16px; font-size: .78rem; color: #6b7280; }

/* ── Bottom CTA (sticky mobile bar) ── */
.bottom-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -6px 20px rgba(0,0,0,.08);
  padding: 10px 0;
  z-index: 100;
}
.cta-inner { display: flex; align-items: center; gap: 14px; }
.cta-total { display: block; font-weight: 900; font-size: 1.3rem; color: #16a34a; }
.cta-gift { display: block; font-size: .78rem; color: #6b7280; }
.cta-inner .btn-checkout { flex-shrink: 0; width: auto; min-width: 140px; }

/* ── Saved Orders ── */
.saved-section { margin-top: 20px; padding-bottom: 100px; }
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px; height: 24px;
  background: #16a34a;
  color: white;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 900;
  padding: 0 8px;
}
.saved-list { display: grid; gap: 10px; }
.saved-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 8px;
}
.saved-card .sc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.saved-card .sc-pkg { font-weight: 850; }
.saved-card .sc-total { color: #16a34a; font-weight: 900; font-size: 1.1rem; }
.saved-card .sc-meta { color: #6b7280; font-size: .85rem; }
.empty-state { color: #6b7280; font-size: .9rem; }

/* ── Toast ── */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #172033;
  color: white;
  font-weight: 800;
  font-size: .9rem;
  padding: 14px 24px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  z-index: 200;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }

/* ── Confetti ── */
#confettiContainer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── Mobile-first ── */
@media (max-width: 640px) {
  .sales-header { padding: 24px 16px 20px; }
  .order-summary { position: static; border-radius: 18px; }
  .summary-head { border-radius: 18px 18px 0 0; }
  .bottom-cta { display: block; }
  body { padding-bottom: 80px; }
  .saved-section { padding-bottom: 100px; }
}

@media (min-width: 768px) {
  .order-summary {
    width: 360px;
    float: right;
    margin-left: 20px;
  }
  .container { max-width: 800px; }
  .package-grid { grid-template-columns: repeat(2, 1fr); }
}
