/* ConSurv theme: the product quick view (template-parts/quick-view.php, assets/js/quick-view.js). Loaded on category
   pages only, after consurv.css, whose custom properties and .btn styles it uses. A panel over the page on wide screens,
   full screen on phones; every control is at least 44px; no motion under prefers-reduced-motion. */
/* The scroll lock keeps the scrollbar's space, so the page behind doesn't jump sideways where scrollbars take room (Windows). */
html.cs-product-open { overflow: hidden; scrollbar-gutter: stable; }

.qv { width: min(940px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: min(760px, calc(100dvh - 32px)); margin: auto; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--c-bg); color: var(--c-ink); box-shadow: 0 30px 80px -20px rgb(8 33 82 / .55); overflow: hidden; }
.qv[open] { display: flex; flex-direction: column; }
.qv::backdrop { background: rgb(13 17 23 / .62); }
.qv :focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.qv__panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.qv__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: .375rem .375rem .375rem 1.25rem; border-bottom: 1px solid var(--c-line); }
.qv__pos { font: 600 var(--fs-xs)/1.3 var(--font-sans); letter-spacing: .04em; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.qv__close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-btn); background: none; color: var(--c-ink); cursor: pointer; transition: background-color .15s, color .15s; }
.qv__close:hover { background: var(--c-blue-tint); color: var(--c-blue); }
.qv__close .icon { width: 24px; height: 24px; stroke-width: 2.2; }

.qv__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.qv__body { display: grid; grid-template-columns: minmax(0, 400px) minmax(260px, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; padding: clamp(16px, 2.5vw, 28px); }
.qv__media { display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--c-line); }
.qv__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qv__placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: var(--c-bg-alt); }
.qv__placeholder-mark { width: 36%; height: 36%; color: var(--c-line-2); fill: currentColor; }

.qv__info { min-width: 0; padding-top: .25rem; }
.qv__title { margin-top: .45rem; font-size: clamp(1.875rem, 1.4rem + 1.4vw, 2.5rem); line-height: 1; overflow-wrap: anywhere; }
.qv__title:focus { outline: none; }
.qv__summary { margin-top: .85rem; color: var(--c-ink-2); }
.qv__specs-title { margin-top: 1.25rem; font: 600 .75rem/1.3 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.qv__specs { list-style: none; margin: .5rem 0 0; padding: 0; border-top: 2px solid var(--c-ink); }
.qv__specs li { position: relative; padding: .5rem 0 .5rem 1.6rem; border-bottom: 1px solid var(--c-line); font-size: var(--fs-sm); line-height: 1.45; }
.qv__specs li::before { content: ""; position: absolute; left: 0; top: .72rem; width: 1rem; height: 1rem; background: var(--c-blue); -webkit-mask: var(--compass-sm) center / contain no-repeat; mask: var(--compass-sm) center / contain no-repeat; }

.qv__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.qv__actions .btn { min-height: 48px; }
.qv__add.is-added { background: var(--c-blue-tint); border-color: var(--c-blue); color: var(--c-blue); }
.qv__add.is-added:hover { background: var(--c-blue-tint-2); color: var(--c-blue-hover); }
.qv__add.is-added .qv__add-plus { display: none; }
.qv__maker { margin-top: .9rem; font-size: var(--fs-sm); }
.qv__link { display: inline-flex; align-items: center; gap: .35em; min-height: 44px; font-weight: 600; }
.qv__link .icon { width: 1.05em; height: 1.05em; stroke-width: 2; }

.qv__nav { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem; border-top: 1px solid var(--c-line); background: var(--c-bg-alt); }
.qv__nav[hidden] { display: none; }
.qv__step { display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: .45rem 1rem; border: 1.5px solid var(--c-blue-tint-2); border-radius: var(--radius-btn); background: var(--c-blue-tint); color: var(--c-blue); font: 600 var(--fs-sm)/1.2 var(--font-sans); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.qv__step:hover { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.qv__step .icon { width: 1.1em; height: 1.1em; stroke-width: 2.2; }
.qv__step--prev .icon { transform: scaleX(-1); }

@media (prefers-reduced-motion: no-preference) {
  .qv[open] { animation: qv-in .18s ease-out; }
  .qv[open]::backdrop { animation: qv-fade .18s ease-out; }
}
@keyframes qv-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: none; } }
@keyframes qv-fade { from { opacity: 0; } to { opacity: 1; } }

/* Tablets: a narrower photo column */
@media (max-width: 899.98px) {
  .qv__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
/* Phones: full screen, the photo on top (never taller than about 40% of the screen), the buttons full width */
@media (max-width: 759.98px) {
  .qv { width: 100%; max-width: 100%; height: 100%; max-height: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .qv__body { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1rem var(--gutter) 1.25rem; }
  .qv__media { width: min(100%, 42vh); width: min(100%, 42dvh); margin-inline: auto; }
  .qv__title { font-size: 2rem; }
  /* The buttons right under the summary, so Request a quote and Call show without scrolling; the specs follow.
     (The specs hold no links, so the tab order still matches what's on screen.) */
  .qv__info { display: flex; flex-direction: column; }
  .qv__actions { order: 1; display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 1.1rem; }
  .qv__maker { order: 2; }
  .qv__specs-wrap { order: 3; }
  .qv__actions .btn { width: 100%; }
  .qv__nav { padding: .5rem var(--gutter) calc(.5rem + env(safe-area-inset-bottom, 0px)); }
  .qv__step { flex: 1; justify-content: center; }
}
@media (forced-colors: active) {
  .qv { border: 2px solid CanvasText; }
  .qv__specs li::before { background: CanvasText; }
}
