:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #172033;
  --muted: #6b7485;
  --line: #e4e8ef;
  --accent: #1e6bff;
  --accent-soft: #edf4ff;
  --positive: #138a55;
  --danger: #b42318;
  --shadow: 0 14px 38px rgba(27, 42, 72, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, textarea { font: inherit; }
.topbar {
  height: 62px; padding: 0 28px;
  background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px);
}
.topbar-inner { width: min(1160px, 100%); height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.brand { font-weight: 900; letter-spacing: -.04em; font-size: 22px; }
.topbar-copy { color: var(--muted); font-size: 14px; }
.topbar-spacer { flex: 1; }
.language-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.language-control > span:first-child { margin: 0; white-space: nowrap; }
.language-control select {
  width: auto; min-width: 150px; min-height: 38px; border: 1px solid #cfd5df; border-radius: 10px;
  background: white; padding: 7px 34px 7px 10px; color: var(--text); font: inherit;
}
.page-shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 80px; position: relative; }
.hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin: 0 340px 36px 0; }
.eyebrow, .summary-eyebrow { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .14em; margin: 0 0 10px; }
.hero h1 { font-size: clamp(24px, 3.5vw, 32px); line-height: 1.42; letter-spacing: -.045em; margin: 0; max-width: 700px; }
.lead { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 650px; margin: 18px 0 0; }
.hero-badge { white-space: nowrap; background: var(--accent-soft); color: var(--accent); font-weight: 800; padding: 10px 14px; border-radius: 999px; }
#quote-form { margin-right: 340px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; margin-bottom: 18px; box-shadow: 0 3px 14px rgba(27,42,72,.03); }
.section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.section-heading h2 { margin: 2px 0 4px; font-size: 22px; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.45; }
.step { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: white; font-weight: 900; }
.field-grid { display: grid; gap: 16px; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
.field-grid .wide { grid-column: 1 / -1; }
label > span:first-child { display: block; font-weight: 750; font-size: 14px; margin-bottom: 8px; }
input, textarea {
  width: 100%; border: 1px solid #cfd5df; border-radius: 13px; background: #fff; padding: 13px 14px; min-height: 48px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(30,107,255,.11); }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.product-card {
  display: block; position: relative; overflow: hidden; border: 2px solid var(--line); border-radius: 18px; cursor: pointer; background: white; transition: .16s ease;
}
.product-card input { position: absolute; opacity: 0; pointer-events: none; }
.product-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,107,255,.09); }
.product-photo { width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: #f8f9fb; }
.product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.kds-grid .choice-card { overflow: hidden; }
.kds-photo { display: block; aspect-ratio: 16 / 9; margin: -16px -16px 8px; background: #f8f9fb; overflow: hidden; }
.kds-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qr-option-photo { display: block; width: calc(100% + 32px); aspect-ratio: 16 / 9; margin: -16px -16px 8px; background: #f8f9fb; overflow: hidden; }
.qr-option-photo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }

#kds-options[hidden] { display: none !important; }
#kds-options .muted { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.product-body { padding: 16px; }
.product-body h3 { margin: 0 0 6px; font-size: 16px; }
.product-body p { min-height: 38px; margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.product-body strong { font-size: 18px; }
.selection-mark { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: white; font-weight: 900; opacity: 0; }
.product-card.selected .selection-mark { opacity: 1; }
.choice-block { border: 0; padding: 0; margin: 28px 0 0; }
.choice-block legend { font-weight: 850; margin-bottom: 12px; font-size: 15px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; overflow: hidden; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice-card span { color: var(--muted); font-size: 13px; }
.choice-card .choice-title { color: var(--text); font-size: 15px; font-weight: 850; }
.choice-card strong { margin-top: 6px; }
.qr-quantity-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.qr-quantity-wrap[hidden] { display: none; }
.qr-quantity-wrap label { font-weight: 750; }
.qr-quantity-wrap input { width: 120px; min-height: 42px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; }
.qr-quantity-wrap span { margin-left: auto; font-weight: 800; }
.segmented { display: inline-flex; padding: 4px; background: #eef1f6; border-radius: 12px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; margin: 0; padding: 9px 24px; border-radius: 9px; font-weight: 800; cursor: pointer; }
.segmented input:checked + span { background: white; color: var(--accent); box-shadow: 0 3px 8px rgba(30,45,75,.11); }
.trade-in { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.trade-in-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.trade-in-header h3 { margin: 0 0 5px; }
.trade-in-header p { margin: 0; color: var(--muted); line-height: 1.4; max-width: 520px; }
.trade-row { display: grid; grid-template-columns: 1fr 160px 44px; gap: 10px; align-items: end; margin-top: 12px; }
.icon-button { height: 48px; border: 1px solid var(--line); background: white; border-radius: 12px; cursor: pointer; font-size: 20px; color: var(--danger); }
.notes { padding: 18px 20px; border-radius: 16px; background: var(--surface-soft); }
.notes h3 { margin: 0 0 10px; }
.notes ul { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.65; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0; color: var(--muted); line-height: 1.5; }
.consent input { width: 20px; min-height: 20px; margin-top: 1px; }
.button { border: 0; border-radius: 13px; min-height: 48px; padding: 0 18px; font-weight: 850; cursor: pointer; }
.button.primary { background: var(--accent); color: #fff; width: 100%; font-size: 16px; }
.button.primary:disabled { opacity: .55; cursor: wait; }
.button.secondary { background: var(--accent-soft); color: var(--accent); }
.error { min-height: 22px; color: var(--danger); font-weight: 700; }
.summary-card {
  position: fixed;
  right: max(24px, calc((100vw - 1160px) / 2));
  bottom: 24px;
  z-index: 40;
  width: 310px;
  margin: 0;
  background: #111b2e;
  color: white;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(17,27,46,.22);
}
.summary-card .summary-eyebrow { color: #85adff; }
.summary-row, .summary-total, .summary-monthly { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.summary-row { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); color: #c9d0df; }
.summary-row strong { color: white; }
.summary-row.discount strong { color: #8ee1b4; }
.summary-total { padding: 20px 0 12px; }
.summary-total span { font-weight: 800; }
.summary-total strong { font-size: 28px; letter-spacing: -.03em; }
.summary-monthly { padding: 15px; margin: 8px 0 0; border-radius: 14px; background: rgba(255,255,255,.08); white-space: nowrap; text-align: right; align-items: center; }
.summary-small { color: #aab4c8; font-size: 12px; margin: 14px 0 0; }
dialog { border: 0; border-radius: 24px; padding: 0; width: min(480px, calc(100% - 32px)); box-shadow: 0 30px 80px rgba(15,25,45,.25); }
dialog::backdrop { background: rgba(12,20,35,.55); backdrop-filter: blur(4px); }
.success-content { padding: 34px; text-align: center; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: #e8f8ef; color: var(--positive); display: grid; place-items: center; margin: 0 auto 16px; font-size: 28px; font-weight: 900; }
.success-content h2 { margin: 0 0 8px; }
.success-values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.success-values div { background: var(--surface-soft); border-radius: 14px; padding: 15px; }
.success-values span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.muted { color: var(--muted); }
@media (max-width: 940px) {
  .page-shell { width: min(760px, calc(100% - 24px)); padding-top: 30px; padding-bottom: 170px; }
  .hero, #quote-form { margin-right: 0; }
  .summary-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    padding: 14px 16px;
    border-radius: 18px;
  }
  .summary-eyebrow, .summary-row, .summary-small { display: none; }
  .summary-total, .summary-monthly { padding: 0; margin: 0; }
  .summary-total { flex-direction: column; align-items: flex-start; gap: 2px; }
  .summary-total strong { font-size: 23px; }
  .summary-monthly { justify-content: flex-end; text-align: right; background: transparent; }
}
@media (max-width: 680px) {
  .topbar { padding: 0 12px; }
  .topbar-copy { display: none; }
  .language-control > span:first-child { display: none; }
  .language-control select { min-width: 132px; max-width: 42vw; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-badge { display: none; }
  .panel { padding: 20px; border-radius: 18px; }
  .field-grid.two, .field-grid.three, .product-grid, .choice-grid { grid-template-columns: 1fr; }
  .product-photo { aspect-ratio: 16 / 9; }
  .trade-in-header { flex-direction: column; }
  .trade-row { grid-template-columns: 1fr 110px 44px; }
  .summary-total strong { font-size: 24px; }
}

.delivery-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 12px;
}
.button.share {
  background: #138a55;
  color: #fff;
}
.button.share[hidden] { display: none; }
@media (max-width: 520px) {
  .delivery-actions { grid-template-columns: 1fr; }
}

.button.email {
  background: #172033;
  color: #fff;
}
.button.email.sent {
  background: #e8f8ef;
  color: #138a55;
  cursor: default;
}

/* Keep the supplied square tablet photos inside the existing card photo bounds. */
.tablet-bundle-photo { position: relative; }
.tablet-bundle-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
