/* Buy page: sticky six-type switcher, product rows, new vs used comparison with the four used grades */

/* intro + switcher: the chip bar sits in flow under the intro, then sticks while the six rows scroll */
.buy-intro { padding-bottom: 28px; }
.buy-range { position: relative; }
/* shared .switcher sticks at 72px but the solid header is 68px tall, leaving a 4px see-through gap; sit it flush */
.buy-range .switcher { top: 67px; box-shadow: 0 12px 24px -22px rgba(11,37,50,.55); }
.buy-range .switcher .wrap { padding-block: 14px; }
.buy-range .switch { min-height: 46px; }
.buy-range .switch > :first-child { flex: none; }
.buy-range .switcher .wrap > .switch:first-child { margin-left: auto; }
.buy-range .switcher .wrap > .switch:last-child { margin-right: auto; }
.buy-range .switch:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.buy-range .switch.is-on:hover { border-color: var(--navy); }

/* product rows: six long headings, a touch smaller than Hire so they sit in two to three lines */
.buy-range .prod { scroll-margin-top: 150px; }
.buy-range .switcher + .prod { padding-top: clamp(48px, 6vw, 80px); }
.buy-range .prod-copy h2 { font-size: clamp(32px, 3.2vw, 44px); line-height: 1.02; }
.buy-range .prod-copy > p + p { margin-top: 14px; }
.buy-range .section--paper .carousel-track figure { background: var(--white); }

/* availability note on flat rack + open top */
.prod-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; background: var(--blue-soft); color: var(--navy); font-size: 15px; line-height: 1.5; }
.prod-note svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--blue-deep); }
.section--navy .prod-note { background: rgba(79,163,209,.12); color: rgba(255,255,255,.88); }
.section--navy .prod-note svg { color: var(--blue); }

/* ---------- new vs used ---------- */
.nvu { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: stretch; }
.nvu-col { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px -40px rgba(11,37,50,.55); }
.nvu-col--new { border-top: 4px solid var(--blue); }
.nvu-col--used { border-top: 4px solid var(--navy); }
.nvu-media { position: relative; flex: 1 1 auto; min-height: clamp(240px, 23vw, 330px); margin: 0; background: var(--navy); overflow: hidden; }
.nvu-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.nvu-body { flex: none; }
.nvu-tag { position: absolute; left: 16px; top: 16px; padding: 7px 14px; border-radius: 6px; background: var(--blue); color: var(--ink); font-family: var(--font-head); font-weight: 600; font-size: 16px; letter-spacing: .1em; text-transform: uppercase; }
.nvu-tag--used { background: var(--navy); color: var(--white); }
.nvu-body { padding: clamp(22px, 2.6vw, 34px); }
.nvu-body h3 { font-size: clamp(24px, 2.2vw, 30px); font-weight: 600; line-height: 1.05; color: var(--navy); }
.nvu-body p { margin-top: 14px; color: var(--muted); line-height: 1.65; }
.nvu-vs { align-self: center; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: .06em; box-shadow: 0 0 0 8px var(--white), 0 0 0 9px var(--line); }

/* used grades ladder, visually hung off the used column */
.grades { margin-top: clamp(40px, 5vw, 64px); }
.grades-label { display: flex; align-items: center; gap: 16px; margin: 0 0 22px; font-family: var(--font-head); font-weight: 600; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.grades-label::before, .grades-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.grade-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: g; }
.grade { display: flex; flex-direction: column; background: var(--paper); border-radius: 12px; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.grade:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -30px rgba(11,37,50,.6); }
.grade-media { margin: 0; background: var(--navy); }
.grade-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.grade-body { position: relative; padding: 20px 20px 24px; }
.grade-no { position: absolute; right: 16px; top: -26px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: var(--white); font-family: var(--font-head); font-weight: 600; font-size: 19px; border: 3px solid var(--paper); }
.grade h4 { font-size: 22px; font-weight: 600; line-height: 1.05; color: var(--navy); padding-right: 52px; }
.grade p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--muted); }

.nvu-close { max-width: 780px; margin: clamp(36px, 4.5vw, 56px) auto 0; text-align: center; }
.nvu-close p { font-size: 18px; line-height: 1.65; color: var(--text); }
.nvu-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

@media (max-width: 1100px) {
  .grade-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nvu { grid-template-columns: minmax(0, 1fr); }
  .nvu-vs { justify-self: center; width: 54px; height: 54px; font-size: 19px; margin-block: -34px; position: relative; z-index: 1; }
}
@media (max-width: 560px) {
  .grade-list { grid-template-columns: minmax(0, 1fr); }
  .buy-range .switcher .wrap { padding-block: 10px; }
  .buy-range .switch { font-size: 16px; padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .grade { transition: none; }
  .grade:hover { transform: none; }
}

/* carousels: focusable track (keyboard scroll) and 44px dot hit areas; the shared dots are 10px buttons */
.buy-range .carousel-track:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.buy-range .carousel-dots { gap: 0; margin-left: -17px; }
.buy-range .carousel-dots button, .buy-range .section--navy .carousel-dots button, .buy-range .carousel-dots button[aria-current="true"] { width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border-radius: 8px; }
.buy-range .carousel-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: #c4ccd1; transition: width .3s var(--ease), background .3s; }
.buy-range .section--navy .carousel-dots button::before { background: rgba(255,255,255,.3); }
.buy-range .carousel-dots button[aria-current="true"]::before { width: 28px; background: var(--blue); }
.buy-range .carousel-dots button:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) { .buy-range .carousel-dots button::before { transition: none; } }
