:root {
  --navy: #0b2a4a;
  --navy-2: #123c66;
  --teal: #1fb5c4;
  --teal-d: #0e8f9c;
  --ink: #16293b;
  --muted: #5b7083;
  --line: #d9e2e9;
  --bg: #f3f6f8;
  --card: #fff;
  --bad: #c0392b;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }

/* ---- top banner */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: .01em; }
.cart-btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); color: #fff; padding: 9px 14px; border-radius: 999px; font-weight: 600; }
.cart-btn:hover { background: rgba(255,255,255,.2); }
.cart-count { background: rgba(255,255,255,.25); border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: .8rem; padding: 0 6px; }
.cart-count.has { background: var(--teal); color: #05323a; }

/* ---- intro */
.intro { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 34px 0 54px; }
.intro h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; max-width: 760px; }
.intro p { color: #c9dbea; max-width: 640px; margin: 12px 0 20px; font-size: 1.05rem; }
.how { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.how li { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.how b { background: var(--teal); color: #05323a; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; }

main > .wrap { padding-top: 0; padding-bottom: 60px; }
#builder-view { margin-top: -30px; }
#cart-view { margin-top: 28px; }

/* ---- cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(11,42,74,.06), 0 6px 20px rgba(11,42,74,.06); padding: 22px; margin-bottom: 18px; }
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-h h2 { font-size: 1.15rem; font-weight: 700; flex: 1; }
.card-h h2 small, .card-h small { font-weight: 500; color: var(--muted); font-size: .8rem; margin-left: 6px; }
.num { background: var(--navy); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.field-group { margin-top: 18px; }
.field-group:first-child { margin-top: 0; }
.field-group h3 { font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 10px; }

/* ---- builder layout */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.summary { position: sticky; top: 82px; }
.summary-in { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(11,42,74,.06), 0 10px 30px rgba(11,42,74,.12); border-top: 4px solid var(--teal); }
.preview { background: #eef3f6; border-radius: 10px; margin-bottom: 12px; }
.hatch-svg { width: 100%; height: auto; display: block; }
.summary h3 { font-size: 1.1rem; }
.sum-size { margin: 2px 0 10px; color: var(--muted); font-weight: 600; }
.sum-size span { font-weight: 500; }
.breakdown { list-style: none; padding: 0; margin: 0 0 8px; font-size: .88rem; border-top: 1px solid var(--line); }
.breakdown li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.unit-row, .total-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.total-row { font-size: 1.25rem; font-weight: 800; padding-bottom: 12px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-weight: 600; font-size: .92rem; }
.qty-row.big { padding: 8px 0; }

/* ---- type cards */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.type-card { text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; transition: .15s; }
.type-card b { font-size: 1rem; }
.type-card small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.type-card em { font-style: normal; color: var(--teal-d); font-weight: 600; font-size: .78rem; margin-top: 4px; }
.type-card:hover { border-color: #9fc3d1; }
.type-card.on { border-color: var(--teal); background: #effbfc; box-shadow: 0 0 0 3px rgba(31,181,196,.18); }

/* ---- segmented / chips */
.seg { display: inline-flex; background: #e9eff3; border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; border: 1.5px solid var(--line); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.chip:hover { border-color: #9fc3d1; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---- custom size / steppers */
.custom-size { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.custom-size > label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.custom-size .x { padding-bottom: 12px; color: var(--muted); font-weight: 700; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.stepper button { width: 38px; height: 40px; border: 0; background: #f1f5f8; font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.stepper button:hover { background: #e2eaf0; }
.stepper select, .stepper output { min-width: 74px; text-align: center; font-weight: 700; border: 0; background: #fff; height: 40px; font-size: 1rem; padding: 0 6px; display: grid; place-items: center; }
.stepper select { appearance: none; -webkit-appearance: none; text-align-last: center; cursor: pointer; }

/* ---- swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; text-align: center; font-size: .82rem; font-weight: 600; background: #fff; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch i { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(11,42,74,.25); box-shadow: inset 0 -6px 10px rgba(0,0,0,.08); }
.swatch small { color: var(--teal-d); font-weight: 600; font-size: .72rem; line-height: 1.2; }
.swatch.on { border-color: var(--teal); background: #effbfc; box-shadow: 0 0 0 3px rgba(31,181,196,.18); }
.swatch:focus-within, .opt:focus-within { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---- add-on option cards */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
.opt { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 8px 10px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; transition: .15s; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:hover { border-color: #9fc3d1; }
.opt.on { border-color: var(--teal); background: #effbfc; box-shadow: 0 0 0 3px rgba(31,181,196,.18); }
.opt-art { background: #eef3f6; border-radius: 8px; width: 100%; display: grid; place-items: center; padding: 6px 0; }
.opt-name { font-weight: 600; font-size: .84rem; line-height: 1.25; }
.opt-price { color: var(--teal-d); font-weight: 700; font-size: .8rem; }
.check { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding: 12px 14px; background: #f3f7fa; border-radius: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal-d); }

textarea, input[type=text], input[type=email], input[type=tel] {
  width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
textarea:focus, input:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }

/* ---- buttons */
.btn { border: 0; border-radius: 12px; padding: 13px 20px; font-weight: 700; font-size: 1rem; transition: .15s; }
.btn.primary { background: var(--teal); color: #04323a; }
.btn.primary:hover { background: #29c8d8; }
.btn.primary:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--navy); }
.btn.ghost:hover { background: #eef3f6; }
.btn.block { display: block; width: 100%; margin-top: 8px; }
.btn.sm { padding: 8px 14px; font-size: .88rem; }
.link { background: none; border: 0; color: var(--navy-2); font-weight: 600; text-decoration: underline; padding: 4px; font-size: .9rem; }
.link.danger { color: var(--bad); }

/* ---- cart */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.line { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.line:first-of-type { border-top: 0; padding-top: 0; }
.line-art { background: #eef3f6; border-radius: 10px; align-self: start; }
.line-top { display: flex; justify-content: space-between; gap: 10px; }
.line-top h3 { font-size: 1.05rem; }
.line-price { font-size: 1.1rem; }
.specs { margin: 8px 0 12px; padding-left: 18px; font-size: .88rem; color: #33495c; columns: 1; }
.specs li { margin: 1px 0; }
.line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.line-actions .stepper button { height: 34px; width: 34px; }
.line-actions .stepper output { height: 34px; min-width: 44px; }
.each { color: var(--muted); font-size: .85rem; margin-right: auto; }
#checkout-form { position: sticky; top: 82px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .85rem; }
.f.wide { grid-column: 1 / -1; }
.f i { color: var(--bad); font-style: normal; }
.f.bad input { border-color: var(--bad); background: #fff6f5; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cart-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 8px; padding: 14px; background: #f3f7fa; border-radius: 10px; }
.cart-total small { display: block; color: var(--muted); font-size: .75rem; font-weight: 500; max-width: 200px; line-height: 1.3; margin-top: 2px; }
.cart-total b { font-size: 1.6rem; }
.error { color: var(--bad); font-weight: 600; margin: 8px 0; }
.empty, .done { text-align: center; padding: 48px 22px; }
.empty p, .done p { color: var(--muted); }
.empty .btn, .done .btn { margin-top: 12px; }
.check-big { width: 64px; height: 64px; border-radius: 50%; background: var(--teal); color: #04323a; display: grid; place-items: center; font-size: 2rem; font-weight: 800; margin: 0 auto 14px; }

.footer { background: var(--navy); color: #b9cde0; padding: 22px 0; font-size: .88rem; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer strong { color: #fff; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- responsive */
@media (max-width: 960px) {
  .builder, .cart-layout { grid-template-columns: 1fr; }
  .summary, #checkout-form { position: static; }
  .type-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand { font-size: 1.15rem; }
  .cart-label { display: none; }
  .line { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
}

/* ---- polish */
.f > span { display: block; }
.qty-row { justify-content: flex-start; gap: 14px; }
.qty-row.big { justify-content: space-between; }
.field-group .qty-row { margin-top: 12px; padding: 10px 12px; background: #f3f7fa; border-radius: 10px; }
.line-actions { row-gap: 8px; }
.each { margin-right: auto; margin-left: 4px; }

/* ---- fiberglass models + dimensions legend */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.model { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 10px 6px 10px; background: #fff; border: 2px solid var(--line); border-radius: 12px; transition: .15s; }
.model:hover { border-color: #9fc3d1; }
.model.on { border-color: var(--teal); background: #effbfc; box-shadow: 0 0 0 3px rgba(31,181,196,.18); }
.model-art { background: #eef3f6; border-radius: 8px; width: 100%; display: grid; place-items: center; padding: 6px 0; margin-bottom: 4px; }
.model b { font-size: .95rem; }
.model small { color: var(--muted); font-size: .76rem; }
.model em { font-style: normal; color: var(--teal-d); font-weight: 800; font-size: .95rem; margin-top: 2px; }
.dims { margin: 6px 0 4px; padding: 10px 12px; background: #f6f9fb; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; }
.dims > div { display: flex; flex-direction: column; gap: 1px; }
.dims dt { display: flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.dims dt i { width: 18px; height: 4px; border-radius: 2px; display: inline-block; }
.dims dd { margin: 0 0 0 25px; font-weight: 800; font-size: .95rem; color: var(--ink); }
.dims-note { margin: 4px 0 10px; font-size: .76rem; }
.gemlux { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; position: relative; }
.gemlux input { position: absolute; opacity: 0; pointer-events: none; }
.gemlux.on { border-color: var(--teal); background: #effbfc; box-shadow: 0 0 0 3px rgba(31,181,196,.18); }
.gemlux:focus-within { outline: 2px solid var(--navy); outline-offset: 2px; }
.gemlux-art { display: flex; gap: 6px; background: #eef3f6; border-radius: 8px; padding: 6px; }
.gemlux-txt { display: flex; flex-direction: column; gap: 2px; }
.gemlux-txt small { color: var(--muted); font-size: .84rem; }
.gemlux-price { font-weight: 800; color: var(--teal-d); font-size: 1.1rem; white-space: nowrap; }
@media (max-width: 560px) { .gemlux { grid-template-columns: 1fr auto; } .gemlux-art { grid-column: 1 / -1; justify-content: center; } }

/* ---- logo banner (white so the logo shows true to color) */
.topbar { background: #fff; color: var(--navy); border-bottom: 4px solid var(--navy); box-shadow: 0 2px 10px rgba(11,42,74,.12); }
.topbar-inner { height: 76px; }
.brand { padding: 0; }
.brand img { display: block; height: 56px; width: auto; }
.cart-btn { background: var(--navy); border: 0; color: #fff; }
.cart-btn:hover { background: var(--navy-2); }
.cart-count { background: rgba(255,255,255,.25); }
@media (max-width: 560px) { .topbar-inner { height: 64px; } .brand img { height: 44px; } }

/* ---- fixed (non-selectable) specs */
.fixed-spec { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; background: #f3f7fa; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; }
.fixed-spec span { color: var(--muted); font-size: .88rem; }
.fixed-chip { width: 26px; height: 26px; border-radius: 50%; background: #f4f6f7; border: 2px solid rgba(11,42,74,.3); box-shadow: inset 0 -5px 8px rgba(0,0,0,.08); flex: none; }

/* ---- intro video (top-right of banner) */
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 36px; align-items: start; }
.intro-text { min-width: 0; }
.video-card { width: 100%; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; border: 2px solid rgba(255,255,255,.22); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.video-frame iframe, .video-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { padding: 0; background: #000; cursor: pointer; display: block; }
.video-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s, opacity .2s; opacity: .92; }
.video-play:hover img { transform: scale(1.03); opacity: 1; }
.video-badge { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.video-badge svg { filter: drop-shadow(0 2px 8px rgba(0,0,0,.45)); transition: transform .15s; }
.video-play:hover .video-badge svg { transform: scale(1.1); }
.video-play:focus-visible { outline: 3px solid var(--teal); outline-offset: -3px; }
.intro .video-caption { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 8px 2px 0; max-width: none; font-size: .85rem; color: #c9dbea; }
.video-caption a { color: #7fe3ee; text-decoration: none; font-weight: 600; }
.video-caption a:hover { text-decoration: underline; }
@media (max-width: 960px) {
  .intro-grid { grid-template-columns: 1fr; gap: 22px; }
  .video-card { max-width: 480px; }
}

/* ---- mandatory hardware, notices, drawing link */
.req-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #e3f6f8; color: var(--teal-d); border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.fixed-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #f3f7fa; border: 1px solid var(--line); border-radius: 10px; }
.fixed-item .opt-art { flex: none; width: auto; padding: 4px; background: #fff; border-radius: 8px; padding: 4px; display: flex; }
.fixed-item > span:last-child { min-width: 0; }
.fixed-item b { display: block; }
.fixed-item small { color: var(--muted); font-size: .84rem; }
.notice { margin: 8px 0 0; padding: 9px 12px; background: #fff7e6; border: 1px solid #f2d28b; color: #7a4b00; border-radius: 8px; font-size: .86rem; font-weight: 600; }
.link.pdf { color: var(--teal-d); }
.link.pdf:disabled { opacity: .6; cursor: wait; }
.line-sub { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }

.added-box { margin-top: 10px; padding: 12px; background: #effbfc; border: 1.5px solid var(--teal); border-radius: 12px; }
.added-msg { margin: 0 0 10px; font-weight: 700; color: var(--teal-d); text-align: center; }
.added-actions { display: flex; gap: 8px; }
.added-actions .btn { flex: 1; padding: 11px 8px; font-size: .92rem; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.contact-btn { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--navy); color: var(--navy); background: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.contact-btn:hover { background: #eef3f6; }
.contact-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 560px) { .topbar-actions { gap: 6px; } .contact-btn { padding: 8px 11px; font-size: .88rem; } .cart-btn { padding: 9px 11px; } .cart-label { font-size: .88rem; } }

.fixed-note { margin: 8px 0 0; padding: 9px 12px; background: #fff7e6; border: 1px solid #f2d28b; color: #7a4b00; border-radius: 8px; font-size: .9rem; font-weight: 600; }
