/* ============================================================================
   HPM store front rows (Views/Store/_StoreFront.cshtml) - 4 Nov 2026
   Sits on the public glass tokens (--pg-*). Phone first: every row is a
   horizontal swipe scroller with scroll-snap; arrows appear on pointer devices.
   ========================================================================== */
.sf { --sf-card: 46vw; --sf-gap: 10px; --sf-pad: 16px; margin: 4px 0 18px; }
@media (min-width: 576px) { .sf { --sf-card: 220px; --sf-gap: 14px; --sf-pad: 0; } }

.sf-row { margin: 0 0 26px; }
.sf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 var(--sf-pad); margin-bottom: 10px; }
.sf-title { font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--pg-ink, #14283a); display: flex; align-items: center; gap: 8px; letter-spacing: -0.01em; }
.sf-title .bi { color: var(--pg-sea, #1d6fa4); font-size: 1.05em; }
.sf-sub { margin: 2px 0 0; font-size: .86rem; color: var(--pg-muted, #5b6877); }
.sf-head-actions { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.sf-link { background: none; border: 0; padding: 4px 2px; font-size: .88rem; font-weight: 600; color: var(--pg-sea, #1d6fa4); text-decoration: none; cursor: pointer; }
.sf-link:hover { text-decoration: underline; }
.sf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--pg-sun, #ffc107); color: var(--pg-ink, #14283a); font-size: .84rem; font-weight: 600; text-decoration: none; }
.sf-chip:hover { filter: brightness(1.05); color: var(--pg-ink, #14283a); }
.sf-continue { padding: 0 var(--sf-pad); margin: -8px 0 20px; }
@media (min-width: 576px) { .sf-title { font-size: 1.35rem; } }

/* ---------- scroller ---------- */
.sf-track { position: relative; }
.sf-scroller {
    display: flex; gap: var(--sf-gap); overflow-x: auto; overflow-y: hidden; padding: 4px var(--sf-pad) 10px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-padding-left: var(--sf-pad);
}
.sf-scroller::-webkit-scrollbar { display: none; }
.sf-scroller > * { flex: 0 0 var(--sf-card); scroll-snap-align: start; }
.sf-arrow {
    display: none; position: absolute; top: 40%; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pg-border, rgba(20,40,58,.12));
    background: #fff; color: var(--pg-ink, #14283a); box-shadow: 0 6px 18px rgba(20, 40, 58, .18); align-items: center; justify-content: center; cursor: pointer;
}
.sf-arrow-prev { left: -14px; } .sf-arrow-next { right: -14px; }
.sf-arrow:hover { background: var(--pg-ink, #14283a); color: #fff; }
.sf-arrow[disabled] { opacity: .3; pointer-events: none; }
@media (hover: hover) and (min-width: 768px) { .sf-track:hover .sf-arrow, .sf-track:focus-within .sf-arrow { display: flex; } }

/* ---------- product card ---------- */
.sf-card { display: flex; flex-direction: column; overflow: hidden; height: auto; }
.sf-card-img { display: block; position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.sf-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .2s; }
.sf-card:hover .sf-card-img img { transform: scale(1.04); }
.sf-card-noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--pg-muted, #5b6877); font-size: 2.2rem; background: var(--pg-sea-soft, rgba(29,111,164,.08)); }
.sf-badge { position: absolute; top: 8px; left: 8px; border-radius: 999px; font-size: .7rem; padding: 4px 8px; }
.sf-badge-truck { background: var(--pg-ink, #14283a); color: #fff; }
.sf-badge-featured { background: var(--pg-sun, #ffc107); color: var(--pg-ink, #14283a); }
.sf-star { color: var(--pg-sun, #ffc107) !important; }
/* phones already have the icon category band at the top of the store: no second department strip there */
@media (max-width: 767.98px) { .sf-row-departments { display: none; } }
.sf-card-oos { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(20, 40, 58, .78); color: #fff; font-size: .72rem; text-align: center; padding: 3px 0; }
.sf-card-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sf-card-brand { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pg-muted, #5b6877); }
.pg .sf-card-title, .sf-card-title { font-size: .88rem !important; line-height: 1.25; margin: 0; font-weight: 600; display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; max-height: 2.5em; }
.sf-card-title a { color: inherit; text-decoration: none; }
.sf-card-price { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.sf-price { font-weight: 700; color: var(--pg-sea, #1d6fa4); font-size: 1.05rem; }
.sf-price-sale { color: var(--pg-bad, #c0392b); }
.sf-price-was { color: var(--pg-muted, #5b6877); font-size: .8rem; }
.sf-price-trade { font-size: .74rem; color: var(--pg-ink, #14283a); background: var(--pg-sun-soft, rgba(255,193,7,.22)); border-radius: 999px; padding: 1px 7px; }
.sf-price-bulk { font-size: .72rem; color: var(--pg-muted, #5b6877); width: 100%; }

/* ---------- departments ---------- */
.sf-row-departments .sf-scroller > * { flex-basis: 128px; }
.sf-dept { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 8px; border-radius: var(--pg-radius, 14px); background: #fff; border: 1px solid var(--pg-border, rgba(20,40,58,.12)); text-decoration: none; color: var(--pg-ink, #14283a); box-shadow: var(--pg-shadow, 0 4px 14px rgba(20,40,58,.08)); transition: transform .15s; }
.sf-dept:hover { transform: translateY(-3px); color: var(--pg-ink, #14283a); }
.sf-dept-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--pg-sun, #ffc107); color: var(--pg-ink, #14283a); }
.sf-dept-name { font-size: .8rem; font-weight: 700; line-height: 1.2; }
.sf-dept-count { font-size: .7rem; color: var(--pg-muted, #5b6877); }
@media (min-width: 992px) { .sf-row-departments .sf-scroller { justify-content: space-between; } .sf-row-departments .sf-scroller > * { flex: 1 1 0; } }

/* ---------- budget buttons ---------- */
.sf-budgets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 var(--sf-pad); }
@media (min-width: 768px) { .sf-budgets { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.sf-budget { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 18px 10px; border-radius: var(--pg-radius, 14px); text-decoration: none; color: #fff;
    background: linear-gradient(135deg, var(--pg-navy, #10243a), var(--pg-sea, #1d6fa4)); box-shadow: var(--pg-shadow, 0 4px 14px rgba(20,40,58,.12)); transition: transform .15s, filter .15s; }
.sf-budget:hover { transform: translateY(-3px); filter: brightness(1.08); color: #fff; }
/* the public theme colours every link navy; these tiles are navy themselves, so force the text white */
.pg .sf-budget, .pg .sf-budget:hover, .pg .sf-budget:focus { color: #fff; }
.sf-budget-under { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .85); }
.sf-budget-amount { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--pg-sun, #ffc107); }
.sf-budget-count { font-size: .74rem; color: rgba(255, 255, 255, .85); }

/* ---------- budget page (11 Nov 2026): /Store?maxPrice=250 alone = the store front within that budget ---------- */
.sf-budget-head { padding: 0 var(--sf-pad); margin: 0 0 24px; }
.sf-budget-head .sf-budgets { padding: 0; margin-top: 12px; }
.sf-budget-back { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.sf-budget-heading { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 0; color: var(--pg-ink, #14283a); display: flex; align-items: center; gap: 10px; }
.sf-budget-heading .bi { color: var(--pg-sea, #1d6fa4); font-size: .9em; }
@media (min-width: 576px) { .sf-budget-heading { font-size: 2rem; } }
/* selector: the other budgets step back, the current one keeps the full colour and gets a sun-yellow ring */
.sf-budget-switch .sf-budget { padding: 12px 8px; opacity: .72; }
.sf-budget-switch .sf-budget:hover, .sf-budget-switch .sf-budget:focus-visible { opacity: 1; }
.sf-budget-switch .sf-budget.is-current { opacity: 1; outline: 3px solid var(--pg-sun, #ffc107); outline-offset: 2px; }
.sf-budget-switch .sf-budget-amount { font-size: 1.3rem; }
.sf-budget-all { margin: 14px 0 0; }
.sf-budget-all .sf-link { font-size: .95rem; }
/* phones: the icon band at the top of the store links to whole departments, so a budget page keeps its own
   department tiles (they count and link within the budget) as a swipe row */
@media (max-width: 767.98px) { .sf-is-budget .sf-row-departments { display: block; } }
#sf-all { scroll-margin-top: 96px; }

/* ---------- explore tiles ---------- */
.sf-row-explore .sf-scroller > * { flex-basis: 150px; }
.sf-explore { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--pg-ink, #14283a); }
.sf-explore-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: var(--pg-radius, 14px); background: #fff; border: 1px solid var(--pg-border, rgba(20,40,58,.12)); overflow: hidden; font-size: 2rem; color: var(--pg-muted, #5b6877); }
.sf-explore-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.sf-explore:hover .sf-explore-img { box-shadow: var(--pg-shadow-lift, 0 10px 24px rgba(20,40,58,.18)); }
.sf-explore-name { font-size: .86rem; font-weight: 700; line-height: 1.2; }
.sf-explore-count { font-size: .72rem; color: var(--pg-muted, #5b6877); }

.sf-all-title { font-size: 1.35rem; font-weight: 700; color: var(--pg-ink, #14283a); margin: 6px var(--sf-pad) 4px; display: flex; align-items: center; gap: 8px; }
.sf-all-title .bi { color: var(--pg-sea, #1d6fa4); }

@media (prefers-reduced-motion: reduce) { .sf-card-img img, .sf-dept, .sf-budget { transition: none; } .sf-scroller { scroll-behavior: auto; } }

/* ---------- product page: sticky add-to-cart bar on phones (sits above the contact bar) ---------- */
.pd-sticky {
    position: fixed; left: 0; right: 0; bottom: 64px; z-index: 1029; display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--pg-border, rgba(20,40,58,.12));
    box-shadow: 0 -8px 24px rgba(20, 40, 58, .14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.pd-sticky[hidden] { display: none; }
.pd-sticky-price { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.pd-sticky-amount { font-weight: 800; font-size: 1.15rem; color: var(--pg-ink, #14283a); white-space: nowrap; }
.pd-sticky-note { font-size: .7rem; color: var(--pg-muted, #5b6877); }
.pd-sticky-btn { flex: 1; border-radius: 999px; font-weight: 700; background: var(--pg-sun, #ffc107) !important; border-color: var(--pg-sun, #ffc107) !important; color: var(--pg-ink, #14283a) !important; padding: 10px 14px; }
body.pd-sticky-on { padding-bottom: 80px; }

/* 10 Nov 2026: product page desktop layout. The photo column was empty below the photo, so "Needed with this" and
   "Other sizes & finishes" (.pd-extras) sit there, beside the price and Add to cart. Phones keep the normal stacked order. */
@media (min-width: 768px) {
    .pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 0; align-items: start; }
    .pd-layout > .pd-media { grid-column: 1; grid-row: 1; width: auto; max-width: none; }
    .pd-layout > .pd-info { grid-column: 2; grid-row: 1 / span 2; width: auto; max-width: none; }
    .pd-layout > .pd-extras { grid-column: 1; grid-row: 2; width: auto; max-width: none; }
    .pd-layout > .pd-extras > section:first-child { margin-top: 1rem !important; }
}
.pd-needed .card { border: 2px solid var(--pg-sun, #ffc107); }
.pd-needed .card-header { background: rgba(255, 193, 7, .12); }
.pd-needed-jump { background: rgba(255, 193, 7, .10); border-color: rgba(255, 193, 7, .6) !important; }
.pd-needed-jump:hover { background: rgba(255, 193, 7, .2); }
.pd-variants { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.pd-variants .btn { max-width: none !important; font-size: .82rem; line-height: 1.25; border-radius: 12px; padding: .45rem .7rem; }
/* 12 Nov 2026: quick size / style switcher under the product name (short chips; the current one is filled) */
.pd-switch-title { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; margin-bottom: .35rem; }
.pd-switch-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.pd-chip { display: inline-flex; align-items: center; min-height: 38px; padding: .3rem .8rem; border: 1px solid #adb5bd; border-radius: 999px;
    font-size: .88rem; line-height: 1.2; color: #212529; background: #fff; text-decoration: none; }
a.pd-chip:hover, a.pd-chip:focus-visible { border-color: #212529; background: #f1f3f5; color: #212529; }
.pd-chip-current { background: #212529; border-color: #212529; color: #fff; font-weight: 600; }
.pd-chip-out { color: #6c757d; border-style: dashed; }
.pd-chip-more { border-style: dotted; color: #495057; }
/* 12 Nov 2026: size choice inside the add-to-cart form (radio group shown as chips; Views/Store/_SizeChoice.cshtml) */
.pd-size { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.pd-size legend { float: none; width: auto; padding: 0; }
.pd-size-item { position: relative; display: inline-flex; }
.pd-size-input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pd-size-item .pd-chip { min-width: 44px; justify-content: center; cursor: pointer; }
.pd-size-input:hover + .pd-chip { border-color: #212529; background: #f1f3f5; }
.pd-size-input:checked + .pd-chip { background: #212529; border-color: #212529; color: #fff; font-weight: 600; }
.pd-size-input:focus-visible + .pd-chip { outline: 3px solid #ffc107; outline-offset: 2px; }
.cart-line-sizes { font-size: .85rem; color: #495057; }
