/* SoftDrink — Configurator (Apple-style step-builder) */

.cfg-intro { max-width: 760px; margin: 0 auto; text-align: center; padding: 16px 0 8px; }
.cfg-intro .h-display { margin: 14px 0 14px; font-size: 64px; }
.cfg-intro .lede { margin: 0 auto; max-width: 600px; }

/* Two-column shell */
.cfg-shell {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 40px; align-items: flex-start;
}
.cfg-main { min-width: 0; }
.cfg-summary { position: sticky; top: 92px; }

/* Stepper */
.cfg-stepper {
  list-style: none; margin: 0 0 32px; padding: 14px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: stretch;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-pill); box-shadow: var(--sh-2);
  position: sticky; top: 76px; z-index: 30;
}
.cfg-stepper li {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 8px 6px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--ink-50);
  cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.cfg-stepper li .dot {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--light-gray); color: var(--ink-50);
  font-family: var(--f-display); font-size: 13px; font-weight: 700;
  transition: all .2s;
}
.cfg-stepper li.active { color: #fff; background: var(--sd-blue); }
.cfg-stepper li.active .dot { background: #fff; color: var(--sd-blue); }
/* Step 6 — before submission: behaves like other steps (shows "6" + "Submit"). */
/* After submission: green pill + white tick (or inverse when active). */
body.cfg-submitted .cfg-stepper li[data-step="6"] .dot { font-size: 0; }
body.cfg-submitted .cfg-stepper li[data-step="6"] .dot::before { content: "✓"; font-size: 15px; font-weight: 800; }
body.cfg-submitted .cfg-stepper li[data-step="6"]:not(.active) .dot { background: #1F8A5B; color: #fff; }
body.cfg-submitted .cfg-stepper li[data-step="6"]:not(.active) { color: #1F8A5B; }
body.cfg-submitted .cfg-stepper li[data-step="6"].active { background: #1F8A5B; color: #fff; }
body.cfg-submitted .cfg-stepper li[data-step="6"].active .dot { background: #fff; color: #1F8A5B; }
.cfg-stepper li.done { color: #1F8A5B; }
.cfg-stepper li.done .dot { background: #1F8A5B; color: #fff; box-shadow: 0 0 0 2px rgba(31,138,91,.18); }
.cfg-stepper li.done .dot::before { content: "✓"; font-size: 15px; font-weight: 800; color: #fff; }
.cfg-stepper li.done .dot { font-size: 0; }

/* Steps */
.cfg-step {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 36px 36px 28px;
  margin-bottom: 24px; transition: max-height .4s ease, opacity .3s ease;
}
.cfg-step.is-collapsed { display: none !important; }

.cfg-step-head { margin-bottom: 28px; }
.cfg-step-head .step-no {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--sd-blue); margin-bottom: 8px;
}
.cfg-step-head .h-1 { font-size: 38px; margin-bottom: 10px; }
.cfg-step-head .lede { font-size: 15px; max-width: 620px; }

/* Option grids */
.opt-grid { display: grid; gap: 14px; }
.opt-grid.g-sizes { grid-template-columns: repeat(4, 1fr); }
.opt-grid.g-caps { grid-template-columns: repeat(3, 1fr); }
.opt-grid.g-shapes { grid-template-columns: repeat(5, 1fr); }
.opt-grid.g-tiers { grid-template-columns: repeat(5, 1fr); margin-top: 24px; }
.opt-grid.g-delivery { grid-template-columns: repeat(4, 1fr); }

/* Option card (the apple-shop tile) */
.opt {
  position: relative; display: block; cursor: pointer;
  background: #fff; border: 2px solid var(--line);
  border-radius: var(--r-lg); padding: 18px;
  transition: all .15s ease; min-height: 100%;
}
.opt:hover { border-color: var(--sd-blue); transform: translateY(-1px); box-shadow: var(--sh-2); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) {
  border-color: var(--sd-blue);
  box-shadow: 0 0 0 3px rgba(22,119,201,.18), var(--sh-2);
  background: linear-gradient(180deg, #fff 0%, #F4F8FC 100%);
}
.opt-body { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.opt-meta { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.opt-size .opt-meta { margin-top: 0; }
.opt-name { font-family: var(--f-display); font-weight: 700; font-size: 17px; color: var(--sd-gray-900); }
.opt-spec { font-size: 12px; color: var(--ink-70); line-height: 1.4; }
.opt-bullets { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--ink-70); margin-top: 4px; }
.opt-price { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--sd-blue); }

.badge-flag {
  position: absolute; top: -10px; right: 14px;
  background: var(--sd-blue); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
  box-shadow: var(--sh-blue);
}

/* SIZE bottle visualizations */
.size-vis { display: none !important; }
.size-vis--hidden-orig {
  height: 140px; display: grid; place-items: end center;
  background: linear-gradient(180deg, #F4F8FC 0%, #EAF3FB 100%);
  border-radius: var(--r-md); padding: 12px;
}
.bottle {
  display: block; background: linear-gradient(180deg, rgba(22,119,201,.85), rgba(11,74,128,.95));
  border-radius: 8px 8px 14px 14px; position: relative;
  box-shadow: inset 2px -2px 8px rgba(255,255,255,.18);
}
.bottle::before {
  content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 40%; height: 14px; background: var(--sd-blue-900);
  border-radius: 3px 3px 0 0;
}
.bottle::after {
  content: ""; position: absolute; top: 18%; left: 18%; width: 14%; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  border-radius: 50%;
}
.bottle.s-300  { width: 28px;  height: 60px; }
.bottle.s-350  { width: 30px;  height: 68px; }
.bottle.s-400  { width: 32px;  height: 76px; }
.bottle.s-500  { width: 34px;  height: 88px; }
.bottle.s-600  { width: 36px;  height: 100px; }
.bottle.s-1000 { width: 44px;  height: 116px; }
.bottle.s-1500 { width: 52px;  height: 124px; }

/* CAP visualizations */
.cap-vis { display: none !important; }
.cap-vis--hidden-orig {
  position: relative; height: 130px; display: grid; place-items: center;
  background: linear-gradient(180deg, #F4F8FC 0%, #EAF3FB 100%);
  border-radius: var(--r-md);
}
.cap-shape {
  display: block; background: linear-gradient(180deg, var(--sd-blue) 0%, var(--sd-blue-700) 100%);
  border-radius: 6px 6px 4px 4px; position: relative;
  box-shadow: inset 2px -2px 6px rgba(255,255,255,.16);
}
.cap-shape.c-long    { width: 64px; height: 56px; }
.cap-shape.c-short   { width: 64px; height: 38px; }
.cap-shape.c-tethered { width: 64px; height: 42px; }
.cap-shape::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 2px;
  background: rgba(255,255,255,.3); border-radius: 2px;
  box-shadow: 0 6px 0 rgba(255,255,255,.2), 0 12px 0 rgba(255,255,255,.18);
}
.cap-thread {
  display: block; width: 50px; height: 14px;
  background: repeating-linear-gradient(180deg, var(--ink-30) 0 2px, transparent 2px 4px);
  border-radius: 0 0 4px 4px; margin-top: -2px; opacity: .55;
}
.tether {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-22px);
  width: 4px; height: 14px; background: var(--sd-blue-700); border-radius: 2px;
}

/* SHAPE silhouettes */
.shape-vis {
  height: 150px; display: grid; place-items: end center;
  background: linear-gradient(180deg, #F4F8FC 0%, #EAF3FB 100%);
  border-radius: var(--r-md); padding: 10px;
}
.silhouette {
  display: block; width: 44px; background: var(--sd-blue);
  position: relative; box-shadow: inset 2px -2px 6px rgba(255,255,255,.18);
}
.silhouette::before {
  content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 45%; height: 12px; background: var(--sd-blue-900); border-radius: 3px 3px 0 0;
}
.sh-round   { height: 110px; border-radius: 22px 22px 16px 16px; }
.sh-slim    { height: 124px; width: 36px; border-radius: 18px 18px 8px 8px; }
.sh-ribbed  { height: 110px; border-radius: 18px 18px 14px 14px; background: repeating-linear-gradient(180deg, var(--sd-blue) 0 8px, var(--sd-blue-700) 8px 10px); }
.sh-square  { height: 110px; width: 50px; border-radius: 8px; }
.sh-custom {
  height: 110px; width: 50px; border-radius: 12px;
  background: repeating-linear-gradient(45deg, var(--sd-blue) 0 6px, var(--sky-blue) 6px 12px);
  display: grid; place-items: center; color: #fff; font-size: 32px; font-weight: 800;
  font-family: var(--f-display);
}
.sh-custom::before { display: none; }

/* QUANTITY block */
.qty-block {
  background: linear-gradient(135deg, #F4F8FC 0%, #EAF3FB 100%);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px 36px 28px;
}
.qty-readout { text-align: center; }
.qty-num {
  font-family: var(--f-display); font-weight: 800;
  font-size: 80px; line-height: 1; color: var(--sd-blue); letter-spacing: -0.03em;
}
.qty-unit { font-size: 14px; color: var(--ink-70); margin-top: 6px; font-weight: 600; }
.qty-tier {
  margin-top: 14px; display: inline-block;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 6px 14px; font-size: 12px; color: var(--sd-blue); font-weight: 700;
}
.qty-slider {
  width: 100%; margin-top: 26px; -webkit-appearance: none; appearance: none;
  height: 8px; background: linear-gradient(90deg, var(--sd-blue) 0%, var(--sd-blue) var(--p,16%), #D4E2EE var(--p,16%), #D4E2EE 100%);
  border-radius: var(--r-pill); outline: none;
}
.qty-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--sd-blue); cursor: pointer;
  box-shadow: var(--sh-2);
}
.qty-slider::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--sd-blue); cursor: pointer;
}
.qty-ticks {
  display: flex; justify-content: space-between; margin-top: 10px;
  font-family: var(--f-mono); font-size: 11px; color: var(--ink-50);
}

.tier-tag {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--sky-blue); color: var(--sd-blue);
  padding: 4px 10px; border-radius: var(--r-pill); align-self: flex-start;
}

/* DELIVERY */
.loc-vis {
  height: 110px; display: grid; place-items: center;
  background: linear-gradient(180deg, #F4F8FC 0%, #EAF3FB 100%);
  border-radius: var(--r-md); color: var(--sd-blue);
}
.loc-vis svg { width: 60%; height: 60%; }
.opt-loc:has(input:checked) .loc-vis { background: var(--sd-blue); color: #fff; }

/* Step footer */
.cfg-step-foot {
  display: flex; gap: 12px; justify-content: space-between;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-soft);
}
.cfg-step-foot .btn:only-child { margin-left: auto; }

/* Form */
.cfg-form { display: grid; gap: 16px; }
.cfg-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-70); }
.cfg-form input, .cfg-form textarea, .cfg-form select {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--f-body); font-size: 14px; color: var(--ink);
  background: #fff;
}
.cfg-form input:focus, .cfg-form textarea:focus { outline: none; border-color: var(--sd-blue); box-shadow: 0 0 0 3px rgba(22,119,201,.15); }
.cfg-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-line { flex-direction: row !important; align-items: center; gap: 10px; }
.check-line input { width: 18px; height: 18px; accent-color: var(--sd-blue); }
.check-line span { font-weight: 500; font-size: 13px; color: var(--ink-70); }

/* Success */
.cfg-success { text-align: center; padding: 30px 20px; }
.cfg-success img { width: auto; height: 220px; max-width: 80%; object-fit: contain; margin: 0 auto 16px; display: block; filter: drop-shadow(0 12px 24px rgba(22,119,201,.2)); }
.cfg-success .h-1 { margin-bottom: 12px; }
.cfg-success .lede { margin: 0 auto 24px; max-width: 460px; }

/* SUMMARY rail */
.sum-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--sh-2);
}
.sum-head { padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.sum-head .h-3 { font-size: 22px; margin-top: 6px; }
.sum-preview {
  display: none !important;
  margin: 18px 0; height: 220px;
  background: linear-gradient(135deg, #EAF3FB 0%, #C7DCF0 100%);
  border-radius: var(--r-md); display: grid; place-items: center;
}
.bottle-preview { position: relative; }
.b-cap {
  position: absolute; left: 50%; transform: translateX(-50%); top: -16px;
  width: 38%; height: 22px; background: var(--sd-blue-900); border-radius: 4px 4px 0 0;
  z-index: 1;
}
.b-body {
  display: block; width: 70px; height: 160px; background: linear-gradient(180deg, var(--sd-blue) 0%, var(--sd-blue-700) 100%);
  border-radius: 14px 14px 22px 22px;
  box-shadow: inset 2px -2px 10px rgba(255,255,255,.18);
  transition: width .3s, height .3s, border-radius .3s;
}
.sum-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.sum-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; }
.sum-list .k { color: var(--ink-50); font-weight: 600; }
.sum-list .v { color: var(--sd-gray-900); font-weight: 600; text-align: right; }

.sum-total { padding-top: 14px; border-top: 1px solid var(--line-soft); display: grid; gap: 8px; }
.sum-total .row { display: flex; justify-content: space-between; align-items: baseline; }
.sum-total .row span { font-size: 13px; color: var(--ink-70); }
.sum-total .row strong { font-family: var(--f-display); font-weight: 800; color: var(--sd-blue); font-size: 22px; }
.sum-total .hint { font-size: 11px; color: var(--ink-50); line-height: 1.5; margin-top: 6px; }

.sum-progress { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.sum-progress .bar { height: 6px; background: var(--light-gray); border-radius: var(--r-pill); overflow: hidden; }
.sum-progress .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--sd-blue), #4DA3DD); transition: width .35s ease; }
.sum-progress .lbl { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--ink-50); margin-top: 6px; letter-spacing: 0.04em; }

/* Help card */
.sum-help {
  margin-top: 16px; background: var(--sky-blue); border-radius: var(--r-lg);
  padding: 18px; display: grid; gap: 8px;
}
.help-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.help-mascot { width: 50px; height: 50px; object-fit: contain; }
.help-title { font-weight: 700; color: var(--sd-gray-900); font-size: 14px; }
.help-sub { font-size: 12px; color: var(--ink-70); }
.help-line {
  display: block; padding: 8px 12px; background: #fff; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--sd-gray-900);
  text-decoration: none;
}
.help-line:hover { background: #fff; color: var(--sd-blue); }

/* Responsive */
@media (max-width: 1100px) {
  .cfg-shell { grid-template-columns: 1fr; }
  .cfg-summary { position: static; }
  .opt-grid.g-sizes,
  .opt-grid.g-shapes,
  .opt-grid.g-tiers,
  .opt-grid.g-delivery { grid-template-columns: repeat(3, 1fr); }
  .opt-grid.g-caps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .cfg-stepper { grid-template-columns: repeat(6, auto); overflow-x: auto; flex-wrap: nowrap; }
  .cfg-stepper li .lbl { display: none; }
  .cfg-step { padding: 24px 18px; }
  .cfg-step-head .h-1 { font-size: 28px; }
  .opt-grid.g-sizes,
  .opt-grid.g-shapes,
  .opt-grid.g-tiers,
  .opt-grid.g-delivery,
  .opt-grid.g-caps { grid-template-columns: repeat(2, 1fr); }
  .cfg-form .form-row { grid-template-columns: 1fr; }
  .qty-num { font-size: 56px; }
}
