/* POS-SURFBOARD-RENTALS-001 — Rentals → Surfboards picker.
   Visual spec: Figma "DSRT Surf Interfaces" node 828-101 (POS • Surfboard rentals). Values
   are lifted from the Figma export as component tokens; layout is Grid/Flex (the export's
   absolute 1536×1024 canvas is NOT reproduced). Scoped to .pbp / #posBoardSessionBanner /
   the gallery overlay, plus two deliberate touches outside it: the Rental span row while the
   picker is on screen (.pbp-mode #posRentalWindow) and the surfboard line in Current Sale
   (.cart-item-board). Nothing else in POS changes.

   Themes follow the POS shell: DARK is the base (no class), LIGHT is `html.rs-light`
   (index.html rsToggleTheme). Every colour below is a token so both themes stay in step —
   the light set is the Figma palette, the dark set is the POS dark palette (tiles #16213e /
   #0f3460, customer hub #9fb3d1 / #dbe7f7). */

.pbp, #posBoardSessionBanner, .pbp-gallery-overlay, .pbp-mode #posRentalWindow, .cart-item-board {
    /* dark (POS default) */
    --pbp-surface: #16213e;          /* cards, panels, inputs */
    --pbp-ink: #f1f5fb;
    --pbp-ink-2: #dbe7f7;
    --pbp-muted: #9fb3d1;
    --pbp-line: #0f3460;
    --pbp-line-strong: #1f4287;
    --pbp-page: #1a1a2e;             /* search box, qty buttons */
    --pbp-well: #0e1a2e;             /* photo wells */
    --pbp-chip: #0f3460;             /* inactive type tab */
    --pbp-blue: #2563eb;             /* filled buttons / active states */
    --pbp-accent: #60a5fa;           /* blue TEXT (prices, links, selected name) */
    --pbp-blue-soft: #1f4287;        /* Selected strip border */
    --pbp-ok: #4ade80;
    --pbp-ok-ink: #86efac;
    --pbp-ok-bg: rgba(22, 163, 74, .18);
    --pbp-ok-line: #166534;
    --pbp-off-bg: #131b33;
    --pbp-off-well: #0c1526;
    --pbp-off-ink: #7f93b3;
    --pbp-off-title: #8ea0bd;
    --pbp-off-price: #5b7fbf;
    --pbp-off-btn: #2a3a5c;
    --pbp-off-btn-ink: #9fb3d1;
    --pbp-ph: #3b4d6e;               /* placeholder board outline */
    --pbp-banner-ok-bg: rgba(22, 163, 74, .15);
    --pbp-banner-ok-line: #166534;
    --pbp-banner-ok-ink: #86efac;
    --pbp-warn-bg: rgba(245, 158, 11, .14);
    --pbp-warn-line: #b45309;
    --pbp-warn-ink: #fcd34d;
    --pbp-err-bg: rgba(239, 68, 68, .14);
    --pbp-err-line: #7f1d1d;
    --pbp-err: #fca5a5;
    --pbp-info-bg: rgba(59, 130, 246, .14);
    --pbp-info-line: #1f4287;
    --pbp-shadow: rgba(0, 0, 0, .35);
    --pbp-overlay: rgba(3, 8, 20, .7);
    font-family: var(--ds-font-body, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    color: var(--pbp-ink);
}
html.rs-light .pbp, html.rs-light #posBoardSessionBanner, html.rs-light .pbp-gallery-overlay,
html.rs-light .pbp-mode #posRentalWindow, html.rs-light .cart-item-board {
    /* light (Figma) */
    --pbp-surface: #ffffff;
    --pbp-ink: #0b1c39;
    --pbp-ink-2: #142b4d;
    --pbp-muted: #586e90;
    --pbp-line: #dce5f1;
    --pbp-line-strong: #c4d1e2;
    --pbp-page: #f7fafe;
    --pbp-well: #f9fbfe;
    --pbp-chip: #ecf1f6;
    --pbp-blue: #0754f5;
    --pbp-accent: #0754f5;
    --pbp-blue-soft: #afcbfa;
    --pbp-ok: #00883c;
    --pbp-ok-ink: #057333;
    --pbp-ok-bg: #d9f9e5;
    --pbp-ok-line: #7acf9b;
    --pbp-off-bg: #f5f7fa;
    --pbp-off-well: #eff3f7;
    --pbp-off-ink: #8295ac;
    --pbp-off-title: #657693;
    --pbp-off-price: #8cb3f2;
    --pbp-off-btn: #c3cedc;
    --pbp-off-btn-ink: #ffffff;
    --pbp-ph: #b3c2d6;
    --pbp-banner-ok-bg: #eaf9ee;
    --pbp-banner-ok-line: #9ad9ad;
    --pbp-banner-ok-ink: #075b29;
    --pbp-warn-bg: #fff7e6;
    --pbp-warn-line: #f5c46b;
    --pbp-warn-ink: #7a4a00;
    --pbp-err-bg: #fbe1e1;
    --pbp-err-line: #f3b7b9;
    --pbp-err: #cb2930;
    --pbp-info-bg: #eef4ff;
    --pbp-info-line: #aad0ff;
    --pbp-shadow: rgba(11, 28, 57, .06);
    --pbp-overlay: rgba(11, 28, 57, .55);
}

.pbp-visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Session context banner (sits above the Rental span row) ── */
#posBoardSessionBanner { margin: 0 0 10px; }
.pbp-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
    padding: 10px 14px; border-radius: 7px; border: 1px solid;
    font-size: 12px; line-height: 15px;
}
.pbp-banner strong { font-weight: 600; }
.pbp-banner-ok { background: var(--pbp-banner-ok-bg); border-color: var(--pbp-banner-ok-line); color: var(--pbp-banner-ok-ink); }
.pbp-banner-warn { background: var(--pbp-warn-bg); border-color: var(--pbp-warn-line); color: var(--pbp-warn-ink); }
.pbp-banner-detail { font-weight: 600; }
.pbp-banner-warn .pbp-banner-detail { font-weight: 400; }
/* A suggestion only (no session needed for a board): neutral, never blocks. */
.pbp-banner-info { background: var(--pbp-surface); border-color: var(--pbp-line); color: var(--pbp-ink-2); }
.pbp-banner-info .pbp-banner-detail { font-weight: 400; }
.pbp-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.pbp-banner-btn {
    margin-left: auto; padding: 5px 10px; border-radius: 6px; border: 1px solid currentColor;
    background: var(--pbp-surface); color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}
.pbp-banner-pick { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.pbp-banner-pick .pbp-select { min-width: 220px; }

/* Rental span row, restyled only while the surfboard picker is on screen. */
.pbp-mode #posRentalWindow { padding: 4px 0 14px !important; gap: 10px !important; border-bottom: 1px solid var(--pbp-line); margin-bottom: 16px; }
.pbp-mode #posRentalWindow input,
.pbp-mode #posRentalWindow select {
    height: 35px; padding: 0 10px !important; border: 1px solid var(--pbp-line-strong); border-radius: 6px;
    background: var(--pbp-surface); color: var(--pbp-ink); font-size: 12px; font-weight: 500; color-scheme: dark;
}
html.rs-light .pbp-mode #posRentalWindow input,
html.rs-light .pbp-mode #posRentalWindow select { color-scheme: light; }
.pbp-mode #posRentalWindow #prwHint { color: var(--pbp-muted) !important; font-size: 12px !important; }

/* ── Header: title + search ── */
.pbp { display: flex; flex-direction: column; gap: 14px; container-type: inline-size; }
.pbp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pbp-title { margin: 0; font-size: 25px; line-height: 30px; font-weight: 700; color: var(--pbp-ink); }
.pbp-search { flex: 0 1 303px; min-width: 200px; }
.pbp-search-input {
    width: 100%; height: 34px; box-sizing: border-box; padding: 0 12px 0 32px;
    border: 1px solid var(--pbp-line-strong); border-radius: 6px; font-size: 12px; color: var(--pbp-ink);
    background: var(--pbp-page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6' fill='none' stroke='%237f93b3' stroke-width='2.2'/%3E%3Cline x1='14.5' y1='14.5' x2='20' y2='20' stroke='%237f93b3' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center / 14px;
}
.pbp-search-input::placeholder { color: var(--pbp-muted); }

/* ── Toolbar: type tabs + dropdown filters ── */
.pbp-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.pbp-tabs, .pbp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.pbp-tab {
    height: 36px; padding: 0 14px; border: 0; border-radius: 7px; background: var(--pbp-chip);
    color: var(--pbp-ink-2); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.pbp-tab.active { background: var(--pbp-blue); color: #fff; }
/* Rental length (Session / Rest of Day / Day) — one segmented control, prices on the cards follow it. */
.pbp-spans { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--pbp-line); border-radius: 7px; overflow: hidden; background: var(--pbp-surface); }
.pbp-spans-lbl { padding: 0 10px 0 12px; font-size: 12px; font-weight: 600; color: var(--pbp-muted); white-space: nowrap; }
.pbp-span {
    height: 36px; padding: 0 14px; border: 0; border-left: 1px solid var(--pbp-line); background: transparent;
    color: var(--pbp-ink-2); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pbp-span.active { background: var(--pbp-blue); color: #fff; }
.pbp-span:disabled { cursor: default; opacity: .6; }
.pbp-span:focus-visible { outline: 2px solid var(--pbp-accent); outline-offset: -2px; }
.pbp-select {
    height: 36px; padding: 0 28px 0 12px; border: 1px solid var(--pbp-line); border-radius: 6px;
    background: var(--pbp-surface); color: var(--pbp-ink); font-size: 12px; font-weight: 500; cursor: pointer;
}
.pbp-toolbar .pbp-clear { font-size: 12px; }
.pbp-select.active { border-color: var(--pbp-accent); color: var(--pbp-accent); }
.pbp-clear, .pbp-link {
    border: 0; background: none; padding: 4px 2px; color: var(--pbp-accent);
    font-size: 11px; font-weight: 500; cursor: pointer;
}
.pbp-clear:disabled { color: var(--pbp-muted); opacity: .55; cursor: default; }
.pbp-tab:focus-visible, .pbp-select:focus-visible, .pbp-clear:focus-visible, .pbp-link:focus-visible,
.pbp-add:focus-visible, .pbp-zoom:focus-visible, .pbp-cta:focus-visible, .pbp-qty-btn:focus-visible,
.pbp-card:focus-visible, .pbp-banner-btn:focus-visible, .pbp-thumb:focus-visible,
.pbp-gallery-nav:focus-visible, .pbp-gallery-close:focus-visible {
    outline: 2px solid var(--pbp-accent); outline-offset: 2px;
}

/* ── Notices ── */
.pbp-notice:empty { display: none; }
.pbp-notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 7px; font-size: 12px; }
.pbp-notice.is-error { background: var(--pbp-err-bg); color: var(--pbp-err); border: 1px solid var(--pbp-err-line); }
.pbp-notice.is-info { background: var(--pbp-info-bg); color: var(--pbp-ink-2); border: 1px solid var(--pbp-info-line); }

/* ── Card grid ── */
.pbp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 7px; }
.pbp-empty { grid-column: 1 / -1; padding: 28px 16px; text-align: center; color: var(--pbp-muted); font-size: 13px; background: var(--pbp-surface); border: 1px dashed var(--pbp-line); border-radius: 8px; }
.pbp-empty-inline { padding: 12px 16px; }

.pbp-card {
    position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px;
    min-height: 232px; padding: 8px; box-sizing: border-box;
    background: var(--pbp-surface); border: 1px solid var(--pbp-line); border-radius: 8px; cursor: pointer;
}
.pbp-card.is-selected { border-color: var(--pbp-blue); box-shadow: 0 0 0 1px var(--pbp-blue) inset; }
.pbp-card.is-unavailable { background: var(--pbp-off-bg); cursor: default; }
/* Dark theme: the same green rental rail every POS rental tile carries (pos.css .quick-key.rental);
   greyed on unavailable boards so it never reads as "free". Selected turns it blue (below). */
html:not(.rs-light) .pbp-card { border-left: 4px solid var(--success, #4CAF50); }
html:not(.rs-light) .pbp-card.is-unavailable { border-left-color: var(--pbp-off-btn); }
/* Dark selected: a thin blue outline next to the green rail is easy to miss — the rail itself
   turns light blue, the outline thickens and the card gets a faint blue tint. */
html:not(.rs-light) .pbp-card.is-selected {
    border-color: var(--pbp-accent); border-left-color: var(--pbp-accent);
    box-shadow: 0 0 0 2px var(--pbp-accent), 0 0 14px rgba(96, 165, 250, .35);
    background: linear-gradient(rgba(96, 165, 250, .10), rgba(96, 165, 250, .10)), var(--pbp-surface);
}
.pbp-card-img {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 214px; border-radius: 7px; background: var(--pbp-well); overflow: hidden;
}
.pbp-card.is-unavailable .pbp-card-img { background: var(--pbp-off-well); }
.pbp-card.is-unavailable .pbp-photo { filter: grayscale(.6); opacity: .7; }
.pbp-photo { max-width: 100%; max-height: 206px; object-fit: contain; display: block; }
.pbp-photo-ph {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    width: 100%; height: 100%; min-height: inherit; color: var(--pbp-ph);
}
.pbp-photo-ph svg { width: 34px; height: 104px; }
.pbp-photo-ph-txt { font-size: 10px; color: var(--pbp-muted); }
.pbp-zoom {
    position: absolute; top: 4px; right: 4px; width: 25px; height: 25px; padding: 4px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--pbp-line); border-radius: 50%; background: var(--pbp-surface); color: var(--pbp-ink); cursor: pointer;
}
.pbp-zoom svg { width: 14px; height: 14px; }

.pbp-card-body { display: flex; flex-direction: column; min-width: 0; padding: 27px 4px 0 0; }
.pbp-pill {
    position: absolute; top: 7px; right: 8px; padding: 7px 12px; border-radius: 15px;
    background: var(--pbp-blue); color: #fff; font-size: 10px; font-weight: 600; line-height: 12px;
}
.pbp-card-title { margin: 0 0 7px; font-size: 16px; line-height: 19px; font-weight: 700; color: var(--pbp-ink); overflow-wrap: anywhere; }
.pbp-card.is-unavailable .pbp-card-title { color: var(--pbp-off-title); }
.pbp-card-type { font-size: 13px; line-height: 16px; color: var(--pbp-muted); margin-bottom: 13px; }
.pbp-card-dims { display: flex; gap: 22px; font-size: 13px; line-height: 16px; color: var(--pbp-muted); margin-bottom: 14px; }
.pbp-card-price { display: flex; align-items: baseline; gap: 10px; color: var(--pbp-accent); margin-bottom: 8px; }
.pbp-card-price strong { font-size: 17px; line-height: 21px; font-weight: 700; }
.pbp-card-price span { font-size: 12px; }
.pbp-card.is-unavailable .pbp-card-price strong { color: var(--pbp-off-price); }
.pbp-card-avail { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 13px; color: var(--pbp-ok); margin-bottom: 12px; }
.pbp-card-avail::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pbp-card-avail.is-out { color: var(--pbp-off-ink); }
.pbp-add {
    margin-top: auto; height: 33px; border: 0; border-radius: 6px; background: var(--pbp-blue); color: #fff;
    font-size: 12px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
/* CSS-drawn "+": geometrically centred on the label, unlike the font glyph. */
.pbp-plus { position: relative; flex: 0 0 auto; width: 10px; height: 10px; }
.pbp-plus::before, .pbp-plus::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 2px; border-radius: 1px; background: currentColor; }
.pbp-plus::after { transform: rotate(90deg); }
.pbp-add:disabled { background: var(--pbp-off-btn); color: var(--pbp-off-btn-ink); cursor: not-allowed; }

/* ── Selected strip ── */
/* Flex-wrap (not a fixed grid) so the strip reflows at ANY column width — the POS center
   column narrows with the cart rail, independently of the viewport. */
.pbp-selected {
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
    padding: 9px 14px; min-height: 98px; box-sizing: border-box;
    background: var(--pbp-surface); border: 1px solid var(--pbp-blue-soft); border-radius: 8px;
    position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -6px 16px var(--pbp-shadow);
}
.pbp-selected.is-empty { display: block; min-height: 0; border-style: dashed; border-color: var(--pbp-line); box-shadow: none; position: static; }
.pbp-sel-hint { color: var(--pbp-muted); font-size: 12px; padding: 4px 2px; }
.pbp-sel-img { flex: 0 0 133px; display: flex; align-items: center; justify-content: center; height: 80px; border-radius: 5px; background: var(--pbp-well); overflow: hidden; }
.pbp-sel-img .pbp-photo { max-height: 78px; }
.pbp-sel-img .pbp-photo-ph svg { width: 24px; height: 60px; }
.pbp-sel-info { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }
.pbp-sel-line1 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.pbp-sel-name { font-size: 17px; line-height: 21px; font-weight: 700; color: var(--pbp-accent); overflow-wrap: anywhere; }
.pbp-badge { padding: 5px 12px; border-radius: 14px; border: 1px solid var(--pbp-ok-line); background: var(--pbp-ok-bg); color: var(--pbp-ok-ink); font-size: 12px; font-weight: 500; }
.pbp-badge.is-out { border-color: var(--pbp-line); background: var(--pbp-off-bg); color: var(--pbp-off-ink); }
.pbp-sel-spec { font-size: 14px; line-height: 18px; color: var(--pbp-muted); white-space: pre-wrap; }
.pbp-sel-units { font-size: 13px; line-height: 17px; color: var(--pbp-ink-2); font-weight: 500; }
.pbp-sel-info .pbp-link { padding-left: 0; font-size: 13px; }
.pbp-qty { display: flex; align-items: center; gap: 0; }
.pbp-qty-lbl { font-size: 13px; font-weight: 600; margin-right: 10px; color: var(--pbp-ink); }
.pbp-qty-btn {
    width: 40px; height: 40px; border: 1px solid var(--pbp-line); border-radius: 6px;
    background: var(--pbp-page); color: var(--pbp-accent); font-size: 20px; line-height: 1; cursor: pointer;
}
.pbp-qty-btn:disabled { color: var(--pbp-off-ink); cursor: not-allowed; }
.pbp-qty-val { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 40px; box-sizing: border-box; border: 1px solid var(--pbp-line); border-left: 0; border-right: 0; background: var(--pbp-surface); color: var(--pbp-ink); font-size: 15px; font-weight: 600; }
/* Qty + button row, with the block reason under it at exactly the row width. */
.pbp-sel-actions { flex: 0 1 auto; display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.pbp-sel-act-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.pbp-sel-add { flex: 0 1 auto; display: flex; max-width: 100%; }
.pbp-cta {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
    min-width: min(200px, 100%); max-width: 100%; height: 48px; padding: 0 20px; border: 0; border-radius: 7px; background: var(--pbp-blue); color: #fff;
    font-size: 16px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.pbp-cta:disabled { background: var(--pbp-off-btn); color: var(--pbp-off-btn-ink); cursor: not-allowed; }
/* Why the add is blocked (short; the banner keeps the full story). Icon + text, so the state is
   not colour-only. width 0 + min-width 100% = takes the actions' width, never sets it. */
.pbp-sel-block { display: flex; align-items: center; gap: 7px; width: 0; min-width: 100%; font-size: 13px; line-height: 17px; font-weight: 600; color: var(--pbp-warn-ink); }
/* Session-blocked: ONE row — the short reason left, its action right (no Qty, no Add to cart). */
.pbp-sel-actions.is-session-blocked .pbp-sel-act-row { flex-wrap: nowrap; justify-content: space-between; gap: 16px; }
.pbp-sel-actions.is-session-blocked .pbp-sel-block { width: auto; min-width: 0; flex: 0 1 auto; }
.pbp-warn-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 11px; font-weight: 800; line-height: 1; }
/* The one action that unblocks it: secondary (outline), 44px+ touch target. */
.pbp-sel-fix {
    flex: 0 0 auto; min-height: 48px; padding: 0 18px; border: 1px solid var(--pbp-accent); border-radius: 7px;
    background: transparent; color: var(--pbp-accent); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.pbp-sel-fix:hover { background: var(--pbp-chip); }
.pbp-sel-fix:focus-visible { outline: 2px solid var(--pbp-accent); outline-offset: 2px; }

/* ── Enlarged photo / details ── */
.pbp-gallery-overlay {
    position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: var(--pbp-overlay);
}
.pbp-gallery {
    /* Board photos are tall and narrow — a slim photo column, the rest goes to the facts. */
    display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; gap: 10px 24px;
    width: min(820px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box;
    padding: 18px 20px; background: var(--pbp-surface); border: 1px solid var(--pbp-line); border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.pbp-gallery-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pbp-gallery-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--pbp-ink); }
.pbp-gallery-close { width: 34px; height: 34px; border: 1px solid var(--pbp-line); border-radius: 50%; background: var(--pbp-surface); font-size: 22px; line-height: 1; cursor: pointer; color: var(--pbp-ink); }
.pbp-gallery-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 360px; border-radius: 8px; background: var(--pbp-well); overflow: hidden; }
.pbp-gallery-img { max-width: 100%; max-height: 60vh; object-fit: contain; display: block; }
.pbp-gallery-stage .pbp-photo-ph { min-height: 360px; }
.pbp-gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--pbp-line); background: var(--pbp-surface); color: var(--pbp-ink); font-size: 26px; line-height: 1; cursor: pointer;
}
.pbp-gallery-nav.prev { left: 10px; }
.pbp-gallery-nav.next { right: 10px; }
.pbp-gallery-count { grid-column: 1; font-size: 12px; color: var(--pbp-muted); }
.pbp-gallery-thumbs { grid-column: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.pbp-thumb { width: 64px; height: 64px; padding: 3px; border: 2px solid var(--pbp-line); border-radius: 6px; background: var(--pbp-well); cursor: pointer; overflow: hidden; }
.pbp-thumb.active { border-color: var(--pbp-blue); }
.pbp-thumb-img { width: 100%; height: 100%; object-fit: contain; }
.pbp-thumb .pbp-photo-ph svg { width: 14px; height: 40px; }
.pbp-thumb .pbp-photo-ph-txt { display: none; }
.pbp-gallery-info { grid-column: 2; grid-row: 2 / span 3; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pbp-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; align-content: start; font-size: 12px; }
.pbp-facts dt { color: var(--pbp-muted); }
.pbp-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; color: var(--pbp-ink); }
.pbp-gallery-desc { margin: 0; padding-top: 12px; border-top: 1px solid var(--pbp-line); font-size: 13px; line-height: 1.5; white-space: pre-line; color: var(--pbp-ink); }
.pbp-gallery-desc.empty { font-style: italic; color: var(--pbp-muted); }

/* ── Responsive ── */
@media (max-width: 720px) {
    .pbp-grid { grid-template-columns: 1fr; }
    .pbp-card { grid-template-columns: 96px minmax(0, 1fr); min-height: 0; }
    .pbp-card-img { min-height: 170px; }
    .pbp-search { flex-basis: 100%; }
    .pbp-sel-actions, .pbp-sel-add, .pbp-cta { width: 100%; }
    .pbp-gallery { grid-template-columns: 1fr; }
    .pbp-gallery-info { grid-column: 1; grid-row: auto; }
    .pbp-gallery-stage, .pbp-gallery-stage .pbp-photo-ph { min-height: 240px; }
}

/* ── Current Sale: board row — the generic cart row with the board photo for an icon; the
   "−" steps the quantity down by removing the highest Board ID ── */
/* A little tighter than the generic row so a typical board name ("Lost Sub Driver 3.0 5'6"") fits on one line. */
.cart-item.cart-item-board { align-items: stretch; gap: 6px; padding: 12px 8px 12px 10px; color: inherit; }
.cart-item-board .cart-item-name .pii-btn { margin-left: 4px; }
.cart-board-nowrap { white-space: nowrap; }
/* Qty / total and × sit in the vertical middle of the row; the photo fills its height. */
.cart-item-board .cart-item-qtyprice, .cart-item-board > .cart-item-remove { align-self: center; }
.cart-item-board .cart-item-qtyprice { margin: 0 2px; }
.cart-item-board .cart-item-qty { gap: 4px; }
.cart-item-board .qty-btn { width: 26px; }
.cart-item-board > .cart-item-remove { margin-left: 0; padding: 4px 2px; }
.cart-board-thumb {
    position: relative; flex: 0 0 34px; width: 34px; min-height: 48px; align-self: stretch; border-radius: 6px; overflow: hidden;
    background: var(--pbp-well); border: 1px solid var(--pbp-line); display: flex; align-items: center; justify-content: center;
}
/* Absolutely placed: the photo never sets the row height — the text does, the photo fills it. */
.cart-board-thumb img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); max-height: none; object-fit: contain; display: block; }
.cart-board-thumb.is-empty::before { content: ''; width: 12px; height: 44px; border: 2px solid var(--pbp-ph); border-radius: 50% / 18%; }
.cart-item-board .qty-btn:disabled { opacity: .45; cursor: not-allowed; }

/* A narrow column (independent of the viewport): the wrapped Selected strip gets tall —
   keep it in flow instead of pinned over the cards. Last in the file so it wins. */
@container (max-width: 700px) {
    .pbp-selected { position: static; box-shadow: none; }
}
/* Single-column POS (shell.css, max-width: 920px): the catalogue can be wider than 700px there, so the
   container rule above misses it and the pinned strip covers the search, filters and Clear filters. */
@media (max-width: 920px) {
    .pbp-selected { position: static; box-shadow: none; }
}
