/* ============================================
   Stocked Auto Parts — Storefront Theme
   ============================================
   Palette anchors (matched to the Stocked Auto Parts brand):
   - Orange primary    : #ef6c1a  (logo orange — CTAs, prices, accents)
   - Navy accent       : #16233d  (top bar, nav, headings, footer)
   - Surface neutrals  : #ffffff / #f4f6f9 / #e5e7eb
   - Body text         : #1f2937
   - Muted text        : #6b7280
*/

:root {
    --sf-primary: #ef6c1a;
    --sf-primary-hover: #d65d10;
    --sf-accent: #16233d;
    --sf-accent-hover: #0f1a2e;
    --sf-navy: #16233d;
    --sf-navy-2: #1f3050;
    --sf-bg: #f4f6f9;
    --sf-surface: #ffffff;
    --sf-border: #e5e7eb;
    --sf-text: #1f2937;
    --sf-text-muted: #6b7280;
    --sf-danger: #dc2626;
    --sf-success: #1a9e4b;
    --sf-paypal: #ffc439;
    --sf-shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
    --sf-shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 10px 15px rgba(0,0,0,0.06);
    --sf-radius: 8px;
    --sf-radius-lg: 12px;
    --sf-content-max: 1280px;
    --sf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reset only what we need — scoped to .sf-body so we never bleed into the admin theme */
.sf-body {
    margin: 0;
    padding: 0;
    background: var(--sf-bg);
    color: var(--sf-text);
    font-family: var(--sf-font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sf-body * {
    box-sizing: border-box;
}

.sf-body a {
    color: var(--sf-accent);
    text-decoration: none;
    transition: color 0.15s;
}

.sf-body a:hover {
    color: var(--sf-accent-hover);
}

.sf-body h1, .sf-body h2, .sf-body h3, .sf-body h4 {
    margin: 0 0 0.5em;
    color: var(--sf-text);
    font-weight: 600;
    line-height: 1.25;
}

.sf-body button {
    font-family: inherit;
    cursor: pointer;
}

/* ============================================
   Header
   ============================================ */

.sf-header {
    background: var(--sf-surface);
    border-bottom: 1px solid var(--sf-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--sf-shadow-sm);
}

.sf-header-inner {
    max-width: var(--sf-content-max);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.sf-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.sf-logo-mark {
    width: 38px;
    height: 38px;
    background: var(--sf-primary);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.sf-logo-text {
    color: var(--sf-text);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.2px;
}

.sf-header-vehicle {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.sf-header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.sf-link.sf-signin {
    color: var(--sf-text);
    font-size: 14px;
    font-weight: 500;
}

.sf-link.sf-signin:hover {
    color: var(--sf-primary);
}

.sf-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--sf-bg);
    border-radius: 50%;
    color: var(--sf-text);
    transition: background 0.15s;
}

.sf-cart:hover {
    background: var(--sf-border);
    color: var(--sf-primary);
}

.sf-cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--sf-primary);
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-cart-count[data-empty="1"] {
    display: none;
}

.sf-subnav {
    border-top: 1px solid var(--sf-border);
    background: var(--sf-surface);
}

.sf-subnav-inner {
    max-width: var(--sf-content-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 28px;
    overflow-x: auto;
}

.sf-subnav-inner a {
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--sf-text-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.sf-subnav-inner a:hover {
    color: var(--sf-primary);
    border-bottom-color: var(--sf-primary);
}

/* ============================================
   Vehicle picker (header)
   ============================================ */

.sf-vehicle-picker {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 720px;
}

.sf-vehicle-picker-row {
    display: flex;
    gap: 6px;
}

.sf-vehicle-select {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    background: var(--sf-bg);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    color: var(--sf-text);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.sf-vehicle-select:focus {
    outline: none;
    border-color: var(--sf-primary);
    background: var(--sf-surface);
}

.sf-vehicle-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sf-vehicle-go {
    flex-shrink: 0;
    height: 38px;
    padding: 0 18px;
    background: var(--sf-primary);
    color: #fff;
    border: none;
    border-radius: var(--sf-radius);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}

.sf-vehicle-go:hover:not(:disabled) {
    background: var(--sf-primary-hover);
}

.sf-vehicle-go:disabled {
    background: var(--sf-border);
    color: var(--sf-text-muted);
    cursor: not-allowed;
}

.sf-vehicle-picker-vin {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sf-vehicle-vin-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sf-text-muted);
    font-weight: 600;
    flex-shrink: 0;
}

.sf-vehicle-vin-input {
    flex: 1;
    min-width: 0;
    height: 30px;
    padding: 0 10px;
    background: var(--sf-bg);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    font-size: 12px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sf-vehicle-vin-input:focus {
    outline: none;
    border-color: var(--sf-primary);
    background: var(--sf-surface);
}

.sf-vehicle-vin-decode {
    flex-shrink: 0;
    height: 30px;
    padding: 0 12px;
    background: var(--sf-surface);
    color: var(--sf-accent);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    font-size: 12px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.sf-vehicle-vin-decode:hover:not(:disabled) {
    background: var(--sf-accent);
    color: #fff;
    border-color: var(--sf-accent);
}

.sf-vehicle-vin-decode:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Collapsed pill (when a vehicle is selected) ── */

.sf-vehicle-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 14px;
    background: linear-gradient(135deg, var(--sf-accent) 0%, var(--sf-primary) 100%);
    color: #fff;
    border-radius: 999px;
    box-shadow: var(--sf-shadow-sm);
    max-width: 100%;
}

.sf-vehicle-pill-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.sf-vehicle-pill-text {
    line-height: 1.15;
    min-width: 0;
}

.sf-vehicle-pill-line1 {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-vehicle-pill-line2 {
    font-size: 11px;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-vehicle-pill-change {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.sf-vehicle-pill-change:hover {
    background: rgba(255, 255, 255, 0.32);
}

.sf-vehicle-pill-clear {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.sf-vehicle-pill-clear:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* ============================================
   Main content area
   ============================================ */

.sf-main {
    min-height: calc(100vh - 280px);
    max-width: var(--sf-content-max);
    margin: 0 auto;
    padding: 32px 20px;
}

/* Hero (used by home page) */
.sf-hero {
    background: linear-gradient(135deg, var(--sf-accent) 0%, var(--sf-primary) 100%);
    color: #fff;
    padding: 80px 20px;
    border-radius: var(--sf-radius-lg);
    text-align: center;
    margin-bottom: 32px;
}

.sf-hero h1 {
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    margin: 0 0 12px;
}

.sf-hero p {
    font-size: 18px;
    opacity: 0.9;
    margin: 0 0 28px;
}

.sf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--sf-primary);
    color: #fff;
    border: none;
    border-radius: var(--sf-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    text-decoration: none;
}

.sf-btn:hover {
    background: var(--sf-primary-hover);
    color: #fff;
}

.sf-btn:active {
    transform: translateY(1px);
}

.sf-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.sf-btn-secondary {
    background: var(--sf-surface);
    color: var(--sf-accent);
    border: 1px solid var(--sf-border);
}

.sf-btn-secondary:hover {
    background: var(--sf-bg);
    color: var(--sf-accent-hover);
}

.sf-btn-danger {
    background: var(--sf-danger);
    color: #fff;
}

.sf-btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}

/* ============================================
   Catalog page (toolbar + grid + footer)
   ============================================ */

.sf-catalog-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sf-catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sf-catalog-search {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 480px;
}

.sf-search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--sf-text-muted);
    pointer-events: none;
}

.sf-catalog-search-input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 38px;
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sf-catalog-search-input:focus {
    outline: none;
    border-color: var(--sf-primary);
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.12);
}

.sf-catalog-summary {
    font-size: 13px;
    color: var(--sf-text-muted);
}

.sf-catalog-fits {
    color: var(--sf-success);
    font-weight: 600;
}

.sf-catalog-count {
    font-weight: 500;
}

.sf-catalog-footer {
    display: flex;
    justify-content: center;
    padding: 16px 0 32px;
}

.sf-load-more {
    min-width: 220px;
}

.sf-card-title-link {
    color: inherit;
    text-decoration: none;
}

.sf-card-title-link:hover h1 {
    color: var(--sf-primary);
}

/* ============================================
   Product card grid (Phase 1.8 uses these)
   ============================================ */

.sf-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.sf-card {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, transform 0.15s;
}

.sf-card:hover {
    box-shadow: var(--sf-shadow-md);
    transform: translateY(-2px);
}

.sf-card-image {
    aspect-ratio: 4 / 3;
    background: var(--sf-bg);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Kit / Assembly badge — overlaid on the image so shoppers know the photo
   represents a multi-piece package */
.sf-kit-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--sf-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 4px;
}

.sf-fits-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--sf-success);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 4px 8px;
    border-radius: 4px;
}

.sf-card-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* THE H1 — every product display, every page, the AI title goes here.
   On the catalog grid we visually scale it to card size, but it stays a real
   <h1> in the DOM for SEO. (Multiple H1s per page is allowed in HTML5 inside
   <article> sectioning, which the cards use.) */
.sf-card-body h1, .sf-card-body h2, .sf-card-heading {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--sf-text);
    margin: 0 0 6px;
    /* Clamp to 3 lines so cards stay even */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sf-card-meta {
    font-size: 12px;
    color: var(--sf-text-muted);
    margin-bottom: 10px;
}

.sf-card-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.sf-card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--sf-text);
}

.sf-card-stock {
    font-size: 12px;
    color: var(--sf-success);
    font-weight: 600;
}

.sf-card-stock.out {
    color: var(--sf-danger);
}

/* Groups the price row + Add-to-Cart/Wishlist actions so they always sit flush
   together at the bottom of the card, regardless of title/description length above
   them — used by the catalog grid, Home featured strip, and PDP related products. */
.sf-card-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf-card-actions {
    display: flex;
    gap: 8px;
}

.sf-card-add {
    flex: 1;
    min-width: 0;
    padding: 10px;
    background: var(--sf-primary);
    color: #fff;
    border: none;
    border-radius: var(--sf-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.sf-card-add:hover {
    background: var(--sf-primary-hover);
}

.sf-card-add:disabled {
    background: var(--sf-border);
    color: var(--sf-text-muted);
    cursor: not-allowed;
}

.sf-card-add.is-added:disabled {
    background: var(--sf-success);
    color: #fff;
}

/* Add-to-wishlist icon button — catalog cards + PDP (see .sf-btn-cart there). */
.sf-wishlist-icon-btn {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    color: var(--sf-text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.sf-wishlist-icon-btn:hover {
    color: var(--sf-danger);
    border-color: var(--sf-danger);
}

.sf-wishlist-icon-btn:disabled {
    cursor: not-allowed;
    opacity: .7;
}

.sf-wishlist-icon-btn.is-added {
    color: var(--sf-danger);
    border-color: var(--sf-danger);
}

.sf-wishlist-icon-btn-lg {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    font-size: 18px;
}

/* ============================================
   Cart page
   ============================================ */

.sf-cart-shell {
    max-width: 1100px;
    margin: 0 auto;
}

.sf-cart-title {
    font-size: 28px;
    margin: 0 0 24px;
}

.sf-cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.sf-cart-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sf-cart-line {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 16px;
    display: grid;
    grid-template-columns: 96px 1fr auto auto;
    gap: 16px;
    align-items: center;
}

.sf-cart-line-image {
    width: 96px;
    height: 96px;
    border-radius: var(--sf-radius);
    overflow: hidden;
    background: var(--sf-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-cart-line-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sf-cart-line-body {
    min-width: 0;
}

.sf-cart-line-title-link {
    color: inherit;
    text-decoration: none;
}

.sf-cart-line-title-link:hover .sf-cart-line-title {
    color: var(--sf-primary);
}

.sf-cart-line-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sf-cart-line-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    background: var(--sf-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    vertical-align: middle;
}

.sf-cart-line-meta {
    font-size: 12px;
    color: var(--sf-text-muted);
    margin-top: 2px;
}

.sf-cart-line-warn {
    font-size: 12px;
    color: var(--sf-danger);
    font-weight: 600;
    margin-top: 6px;
}

.sf-cart-line-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.sf-cart-qty-label {
    font-size: 11px;
    color: var(--sf-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.sf-cart-qty-input {
    display: block;
    width: 64px;
    height: 32px;
    margin-top: 4px;
    padding: 0 8px;
    background: var(--sf-bg);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    text-align: center;
    font-size: 14px;
    font-family: inherit;
}

.sf-cart-qty-input:focus {
    outline: none;
    border-color: var(--sf-primary);
}

.sf-cart-remove {
    background: none;
    border: none;
    color: var(--sf-text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
}

.sf-cart-remove:hover {
    color: var(--sf-danger);
}

.sf-cart-line-price {
    text-align: right;
}

.sf-cart-line-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--sf-text);
}

.sf-cart-line-unit {
    font-size: 11px;
    color: var(--sf-text-muted);
    margin-top: 2px;
}

/* ── Summary box ── */

.sf-cart-summary {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 20px;
    position: sticky;
    top: 96px;
}

.sf-cart-summary-title {
    font-size: 16px;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sf-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    font-size: 14px;
    color: var(--sf-text);
}

.sf-cart-summary-muted {
    color: var(--sf-text-muted);
    font-size: 13px;
}

.sf-cart-summary-divider {
    height: 1px;
    background: var(--sf-border);
    margin: 8px 0;
}

.sf-cart-summary-total {
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
}

.sf-cart-checkout-btn {
    width: 100%;
    margin-top: 16px;
    justify-content: center;
}

.sf-cart-checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sf-cart-clear-link {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: none;
    border: none;
    color: var(--sf-text-muted);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.sf-cart-clear-link:hover {
    color: var(--sf-danger);
}

.sf-cart-keep-shopping {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--sf-text-muted);
}

.sf-cart-keep-shopping:hover {
    color: var(--sf-primary);
}

@media (max-width: 768px) {
    .sf-cart-layout {
        grid-template-columns: 1fr;
    }

    .sf-cart-line {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "image  body"
            "image  controls"
            "price  price";
        gap: 12px;
    }

    .sf-cart-line-image { grid-area: image; width: 80px; height: 80px; }
    .sf-cart-line-body { grid-area: body; }
    .sf-cart-line-controls { grid-area: controls; flex-direction: row; align-items: center; gap: 16px; justify-self: start; }
    .sf-cart-line-price { grid-area: price; text-align: left; padding-top: 8px; border-top: 1px solid var(--sf-border); }
    .sf-cart-summary { position: static; }
}

/* ============================================
   License Activation page
   ============================================ */

.sf-license-shell {
    max-width: 720px;
    margin: 0 auto;
}

.sf-license-title {
    font-size: 26px;
    margin: 0 0 20px;
}

.sf-license-card {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 28px;
    box-shadow: var(--sf-shadow-sm);
}

.sf-license-active {
    border-left: 4px solid var(--sf-success);
}

.sf-license-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
}

.sf-license-badge-active {
    background: #dcfce7;
    color: #166534;
}

.sf-license-badge-inactive {
    background: #fef3c7;
    color: #92400e;
}

.sf-license-card h2 {
    font-size: 20px;
    margin: 0 0 14px;
}

.sf-license-blurb {
    color: var(--sf-text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.sf-license-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid var(--sf-border);
    border-bottom: 1px solid var(--sf-border);
    margin-bottom: 20px;
}

.sf-license-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
}

.sf-license-row > span:first-child {
    color: var(--sf-text-muted);
    font-weight: 500;
}

.sf-license-row > span:last-child {
    color: var(--sf-text);
    text-align: right;
}

.sf-license-muted {
    color: var(--sf-text-muted);
    font-weight: normal;
    font-size: 12px;
}

.sf-license-feature {
    display: inline-block;
    padding: 2px 8px;
    background: var(--sf-bg);
    border-radius: 4px;
    font-size: 11px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color: var(--sf-accent);
    margin-left: 4px;
}

.sf-license-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 8px;
}

.sf-license-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--sf-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sf-license-divider::before,
.sf-license-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sf-border);
}

.sf-license-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sf-license-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sf-license-field > span {
    font-size: 12px;
    color: var(--sf-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sf-license-field input,
.sf-license-field textarea {
    padding: 10px 12px;
    background: var(--sf-bg);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    font-size: 14px;
    font-family: inherit;
}

.sf-license-field textarea {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    resize: vertical;
}

.sf-license-field input:focus,
.sf-license-field textarea:focus {
    outline: none;
    border-color: var(--sf-primary);
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.12);
}

.sf-license-error {
    color: var(--sf-danger);
    font-size: 13px;
    min-height: 1.2em;
}

/* ============================================
   Empty / loading states
   ============================================ */

.sf-empty {
    text-align: center;
    padding: 64px 20px;
    color: var(--sf-text-muted);
}

.sf-empty h2 {
    color: var(--sf-text);
    margin-bottom: 8px;
}

.sf-loading {
    text-align: center;
    padding: 48px 20px;
    color: var(--sf-text-muted);
}

/* ============================================
   Footer
   ============================================ */

.sf-footer {
    background: var(--sf-text);
    color: #d1d5db;
    margin-top: 64px;
}

.sf-footer-inner {
    max-width: var(--sf-content-max);
    margin: 0 auto;
    padding: 48px 20px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
}

.sf-footer-col h4 {
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px;
}

.sf-footer-col p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #9ca3af;
}

.sf-footer-col a {
    display: block;
    color: #d1d5db;
    font-size: 13px;
    padding: 4px 0;
}

.sf-footer-col a:hover {
    color: var(--sf-primary);
}

.sf-footer-base {
    border-top: 1px solid #374151;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .sf-header-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

    .sf-logo-text {
        display: none;
    }

    .sf-header-vehicle {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    .sf-main {
        padding: 16px;
    }

    .sf-catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}

/* ============================================================
   Product Detail Page (PDP)
   ============================================================ */
.sf-pdp {
    max-width: var(--sf-content-max);
    margin: 0 auto;
    padding: 16px 20px 48px;
    font-family: var(--sf-font);
    color: var(--sf-text);
}

.sf-breadcrumb {
    font-size: 13px;
    color: var(--sf-text-muted);
    margin: 8px 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.sf-breadcrumb a { color: var(--sf-accent); text-decoration: none; }
.sf-breadcrumb a:hover { text-decoration: underline; }
.sf-bc-sep { color: var(--sf-text-muted); }
.sf-bc-current { color: var(--sf-text); font-weight: 600; }

/* ── Top: gallery | buy box | fitment ── */
.sf-pdp-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 28px;
    align-items: start;
}

/* Gallery */
.sf-gallery-main {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sf-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.15s ease;
}
.sf-gallery-main.is-zooming img { transform: scale(2); cursor: zoom-in; }
.sf-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.sf-thumb {
    width: 64px; height: 64px;
    border: 2px solid var(--sf-border);
    border-radius: var(--sf-radius);
    background: var(--sf-surface);
    padding: 2px; cursor: pointer;
    transition: border-color 0.15s ease;
}
.sf-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sf-thumb.is-active, .sf-thumb:hover { border-color: var(--sf-primary); }

/* Buy box */
.sf-pdp-badges-top { display: flex; gap: 8px; margin-bottom: 8px; }
.sf-badge {
    display: inline-block;
    font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
    padding: 4px 9px; border-radius: 4px;
}
.sf-badge-capa { background: #e6f4ea; color: var(--sf-primary); border: 1px solid var(--sf-primary); }
.sf-badge-kit { background: #eef2ff; color: var(--sf-accent); border: 1px solid var(--sf-accent); }
.sf-pdp-title { font-size: 26px; line-height: 1.25; margin: 4px 0 12px; font-weight: 700; }
/* Hide the header vehicle filter on pages that opt out (e.g. product detail) */
.sf-hide-vehicle .sf-header-vehicle { display: none; }

/* ============================================================
   Checkout
   ============================================================ */
.sf-checkout-page { max-width: var(--sf-content-max); margin: 0 auto; padding: 16px 20px 48px; }
.sf-checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.sf-checkout-form { min-width: 0; }
.sf-co-card { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: 20px 22px; margin-bottom: 18px; }
.sf-co-card h2 { font-size: 16px; color: var(--sf-navy); margin: 0 0 14px; }
.sf-co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sf-co-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--sf-text-muted); }
.sf-co-grid label.sf-co-full { grid-column: 1 / -1; }
.sf-co-grid input { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 10px 12px; font-size: 14px; color: var(--sf-text); }
.sf-co-grid input:focus { outline: none; border-color: var(--sf-primary); }
.sf-co-billsame { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--sf-text); cursor: pointer; margin-bottom: 4px; }
.sf-co-billsame input { width: 17px; height: 17px; accent-color: var(--sf-primary); cursor: pointer; }
#co-bill-fields { margin-top: 14px; }

/* Tax ID (business, optional) — cart VIN gate + registration */
.sf-cart-taxid { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sf-border); }
.sf-cart-vin .sf-cart-taxid { margin-top: 0; padding-top: 20px; border-top-color: #f4d68a; }
.sf-taxid-label { display: block; font-size: 13px; font-weight: 600; color: var(--sf-text); margin-bottom: 6px; }
.sf-taxid-optional { font-weight: 400; color: var(--sf-text-muted); }
.sf-taxid-input { width: 100%; max-width: 320px; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 10px 12px; font-size: 14px; color: var(--sf-text); }
.sf-taxid-input:focus { outline: none; border-color: var(--sf-primary); }
.sf-taxid-hint, .sf-field-hint { display: block; margin-top: 5px; font-size: 12px; color: var(--sf-text-muted); font-weight: 400; }
.sf-tax-exempt { color: var(--sf-success, #1f9d57); font-weight: 600; }

.sf-checkout-summary { position: sticky; top: 90px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: 18px; box-shadow: var(--sf-shadow-sm); }
.sf-co-lines { margin-bottom: 12px; }
.sf-co-line { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--sf-bg); }
.sf-co-line img { width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--sf-border); border-radius: 6px; background: #fff; }
.sf-co-line-info { flex: 1; min-width: 0; }
.sf-co-line-title { font-size: 12.5px; color: var(--sf-navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-co-line-qty { margin-top: 4px; }
.sf-co-line-qty.sf-qty button { width: 26px; font-size: 14px; }
.sf-co-line-qty.sf-qty .sf-qty-input { width: 34px; font-size: 12.5px; }
.sf-co-line-total { font-weight: 700; font-size: 13px; color: var(--sf-navy); }
.sf-co-note { font-size: 11.5px; color: var(--sf-text-muted); margin-top: 10px; text-align: center; }
.sf-co-error { color: var(--sf-danger); font-size: 13px; margin-top: 8px; text-align: center; }
.sf-co-warn { display: flex; align-items: center; gap: 8px; background: #fff8e6; border: 1px solid #f0d78c; color: #9a5b13; font-size: 12.5px; border-radius: var(--sf-radius); padding: 8px 12px; margin-bottom: 12px; }

.sf-co-confirm { max-width: 560px; margin: 40px auto; text-align: center; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: 40px 28px; }
.sf-co-check i { font-size: 54px; color: var(--sf-success); }
.sf-co-confirm h2 { color: var(--sf-navy); margin: 14px 0 10px; }
.sf-co-confirm p { color: var(--sf-text-muted); line-height: 1.6; }
.sf-co-confirm .sf-btn { margin-top: 16px; }
.sf-co-check.pending i { color: var(--sf-primary); }
.sf-co-pending-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

/* SlimCD hosted payment form */
.sf-co-pay { max-width: 760px; margin: 0 auto; }
.sf-co-pay-head { text-align: center; margin-bottom: 18px; }
.sf-co-pay-head h2 { color: var(--sf-navy); margin: 0 0 6px; }
.sf-co-pay-head p { color: var(--sf-text-muted); }
.sf-iframe-container { position: relative; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); overflow: hidden; min-height: 700px; }
.sf-iframe-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--sf-text-muted); }
.sf-iframe-container iframe { display: block; border: 0; width: 100%; }
.sf-co-pay .sf-co-note { text-align: center; margin-top: 12px; }

/* Customer account */
.sf-account-page { max-width: 980px; margin: 0 auto; }
.sf-account-hello { color: var(--sf-text-muted); font-size: 16px; margin: 0 0 22px; }
.sf-account-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.sf-account-tile { display: flex; flex-direction: column; gap: 4px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: 20px; text-decoration: none; color: var(--sf-navy); transition: border-color .15s ease, transform .15s ease; }
.sf-account-tile:hover { border-color: var(--sf-primary); transform: translateY(-2px); }
.sf-account-tile i { font-size: 22px; color: var(--sf-primary); margin-bottom: 6px; }
.sf-account-tile-t { font-weight: 700; font-size: 15px; }
.sf-account-tile-d { color: var(--sf-text-muted); font-size: 13px; }
.sf-account-note { color: var(--sf-text-muted); font-size: 13px; margin-top: 8px; margin-bottom: 12px; }
.sf-body a.sf-account-tile { color: var(--sf-navy); }

/* Sign-in card */
.sf-auth-page { max-width: 460px; margin: 0 auto; }
.sf-auth-card { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: 28px; }
.sf-auth-title { color: var(--sf-navy); font-size: 22px; margin: 0 0 18px; text-align: center; }
.sf-auth-tabs { display: flex; gap: 6px; background: var(--sf-bg); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.sf-auth-tab { flex: 1; border: none; background: transparent; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--sf-text-muted); cursor: pointer; }
.sf-auth-tab.is-active { background: var(--sf-surface); color: var(--sf-navy); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.sf-auth-label { display: block; font-size: 13px; color: var(--sf-text-muted); margin-bottom: 12px; }
.sf-auth-label input { display: block; width: 100%; margin-top: 5px; border: 1px solid var(--sf-border); border-radius: 8px; padding: 11px 13px; font-size: 14px; outline: none; }
.sf-auth-label input:focus { border-color: var(--sf-primary); box-shadow: 0 0 0 3px rgba(239,108,26,.12); }
.sf-auth-pass-field { position: relative; display: block; }
.sf-auth-pass-field input { padding-right: 40px; }
.sf-auth-pass-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: none; background: transparent; border-radius: 6px; color: var(--sf-text-muted); cursor: pointer; }
.sf-auth-pass-toggle:hover { color: var(--sf-navy); background: var(--sf-bg); }
.sf-auth-pass-toggle:focus-visible { outline: 2px solid var(--sf-primary); outline-offset: 1px; }
.sf-auth-msg { margin-top: 12px; font-size: 13.5px; }
.sf-auth-msg.ok { color: #1f9d57; }
.sf-auth-msg.err { color: #d1495b; }
.sf-auth-msg.warn { color: #b9790a; }
.sf-auth-alt { font-size: 13px; color: var(--sf-text-muted); margin: 14px 0 0; }

/* Email-first "create an account" step on the sign-in card */
.sf-auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--sf-text-muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sf-auth-divider::before, .sf-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--sf-border); }
.sf-auth-regstart { margin-bottom: 6px; }

/* Registration page (wider, multi-section) */
.sf-auth-page-wide { max-width: 640px; }
.sf-auth-card-wide { padding: 26px 26px 24px; }
.sf-auth-sub { text-align: center; font-size: 13.5px; color: var(--sf-text-muted); margin: -8px 0 20px; }
.sf-req-star { color: var(--sf-primary); }

.sf-radio-group { display: flex; gap: 18px; margin-top: 6px; }
.sf-radio-option { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 400; color: var(--sf-text); cursor: pointer; }
.sf-radio-option input { width: 16px; height: 16px; accent-color: var(--sf-primary); cursor: pointer; }
.sf-optional { font-weight: 400; font-size: 12.5px; color: var(--sf-text-muted); }
.sf-auth-card-wide .sf-co-card:last-of-type { margin-bottom: 8px; }

/* Account: order history + set password */
.sf-account-section { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: 20px 22px; margin-bottom: 20px; }
.sf-account-h2 { color: var(--sf-navy); font-size: 17px; margin: 0 0 14px; }
.sf-account-empty { text-align: center; padding: 16px; color: var(--sf-text-muted); }
.sf-ao-head, .sf-ao-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.8fr auto; gap: 12px; align-items: center; padding: 10px 4px; }
.sf-ao-head { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--sf-text-muted); border-bottom: 1px solid var(--sf-border); }
.sf-ao-row { border-bottom: 1px solid var(--sf-border); font-size: 14px; }
.sf-ao-r { text-align: right; }
.sf-ao-num { font-weight: 700; color: var(--sf-navy); font-size: 13px; }
.sf-ao-date { color: var(--sf-text-muted); }
.sf-ao-total { font-weight: 700; }
.sf-ao-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1.5px solid; }
.sf-ao-pill.paid { color: #1f9d57; border-color: #1f9d57; }
.sf-ao-pill.pending { color: #b9790a; border-color: #b9790a; }
.sf-ao-pill.canceled { color: #991b1b; border-color: #991b1b; }
.sf-ao-pill.refunded { color: #b9790a; border-color: #b9790a; }
.sf-ao-actions { display: flex; gap: 6px; justify-content: flex-end; }
.sf-btn-mini { font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 6px; background: var(--sf-primary); text-decoration: none; }
.sf-btn-mini-o { background: transparent; border: 1px solid var(--sf-border); }
.sf-body a.sf-btn-mini { color: #fff; }
.sf-body a.sf-btn-mini-o { color: var(--sf-navy); }
.sf-setpass { display: flex; gap: 8px; flex-wrap: wrap; }
.sf-setpass input { flex: 1; min-width: 200px; border: 1px solid var(--sf-border); border-radius: 8px; padding: 10px 13px; font-size: 14px; outline: none; }
.sf-account-msg { margin-top: 10px; font-size: 13px; }
.sf-account-msg.ok { color: #1f9d57; }
.sf-account-msg.err { color: #d1495b; }
@media (max-width: 640px) { .sf-ao-head { display: none; } .sf-ao-row { grid-template-columns: 1fr 1fr; row-gap: 4px; } .sf-ao-actions { grid-column: 1 / -1; justify-content: flex-start; } }

@media (max-width: 860px) {
    .sf-checkout-layout { grid-template-columns: 1fr; }
    .sf-checkout-summary { position: static; }
}

/* ============================================================
   Shop-by-category drawer (catalog)
   ============================================================ */
.sf-catalog-layout { display: flex; gap: 20px; align-items: flex-start; }
.sf-catalog-shell { flex: 1; min-width: 0; }
.sf-cat-drawer {
    flex: 0 0 264px; background: var(--sf-surface); border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg); overflow: hidden; position: sticky; top: 80px;
    max-height: calc(100vh - 100px); display: flex; flex-direction: column;
}
.sf-cat-drawer-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; background: var(--sf-navy); color: #fff; font-weight: 700; font-size: 14px;
}
.sf-cat-close { background: none; border: none; color: #fff; cursor: pointer; font-size: 16px; }
.sf-cat-tree { overflow-y: auto; padding: 8px; flex: 1; }
.sf-cat-empty { color: var(--sf-text-muted); padding: 12px; font-size: 13px; }

.sf-drawer-handle {
    display: none; align-self: flex-start; padding: 10px 14px; background: var(--sf-navy);
    color: #fff; border: none; border-radius: var(--sf-radius); cursor: pointer; font-weight: 700; font-size: 13px; gap: 7px;
}
.sf-catalog-layout.drawer-collapsed .sf-cat-drawer { display: none; }
.sf-catalog-layout.drawer-collapsed .sf-drawer-handle { display: inline-flex; align-items: center; order: -1; }

.sf-cat-all {
    display: flex; justify-content: space-between; align-items: center; width: 100%;
    background: none; border: none; text-align: left; padding: 8px 10px; margin-bottom: 4px;
    cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--sf-navy); border-radius: var(--sf-radius);
}
.sf-cat-all:hover { background: var(--sf-bg); }
.sf-cat-all.is-active { background: #fff2e8; color: var(--sf-primary); }
.sf-cat-node { margin-bottom: 1px; }
.sf-cat-row { display: flex; align-items: center; border-radius: var(--sf-radius); }
.sf-cat-row.is-active { background: #fff2e8; }
.sf-cat-toggle { width: 26px; flex: 0 0 26px; background: none; border: none; color: var(--sf-text-muted); cursor: pointer; padding: 6px 0; }
.sf-cat-toggle-spacer { width: 26px; flex: 0 0 26px; }
.sf-cat-link, .sf-subcat-link {
    flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px;
    background: none; border: none; text-align: left; padding: 7px 8px 7px 0; cursor: pointer;
    font-size: 13.5px; color: var(--sf-text);
}
.sf-cat-link:hover .sf-cat-name, .sf-subcat-link:hover .sf-cat-name { color: var(--sf-primary); }
.sf-cat-row.is-active .sf-cat-link .sf-cat-name { color: var(--sf-primary); font-weight: 700; }
.sf-cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-cat-count { flex: 0 0 auto; font-size: 11px; color: var(--sf-text-muted); background: var(--sf-bg); border-radius: 10px; padding: 1px 7px; }
.sf-cat-subs { padding-left: 26px; }
.sf-subcat-link { font-size: 12.5px; padding: 5px 8px 5px 4px; }
.sf-subcat-link.is-active .sf-cat-name { color: var(--sf-primary); font-weight: 700; }

/* Mobile-only: "Categories" button + sheet backdrop (see the 800px block below). */
.sf-cat-open, .sf-cat-overlay { display: none; }

/* Phones/small tablets: the category tree becomes a left sheet opened from the toolbar's
   "Categories" button, so results start right under the header instead of below the
   whole tree. Breakpoint shared with SHEET_MQ in CatalogList.ts. */
@media (max-width: 800px) {
    .sf-catalog-layout { display: block; }
    .sf-catalog-layout .sf-cat-drawer,
    .sf-catalog-layout.drawer-collapsed .sf-cat-drawer {
        display: flex; position: fixed; top: 0; left: 0; bottom: 0; z-index: 215;
        width: min(320px, 85vw); max-height: none; margin: 0; border: none; border-radius: 0;
        padding-bottom: env(safe-area-inset-bottom); box-shadow: 4px 0 24px rgba(0,0,0,0.2);
        transform: translateX(-100%); visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }
    .sf-catalog-layout.sheet-open .sf-cat-drawer { transform: translateX(0); visibility: visible; transition: transform .25s ease; }
    .sf-catalog-layout .sf-drawer-handle { display: none; }
    .sf-cat-overlay {
        display: block; position: fixed; inset: 0; z-index: 214; background: rgba(10,18,32,0.45);
        opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
    }
    .sf-catalog-layout.sheet-open .sf-cat-overlay { opacity: 1; visibility: visible; transition: opacity .2s ease; }
    .sf-cat-drawer-head { min-height: 56px; padding: 6px 6px 6px 16px; font-size: 15px; }
    .sf-cat-close { width: 44px; height: 44px; font-size: 20px; }
    .sf-cat-all { min-height: 44px; font-size: 15px; }
    .sf-cat-toggle, .sf-cat-toggle-spacer { width: 40px; flex-basis: 40px; }
    .sf-cat-toggle { min-height: 44px; font-size: 18px; }
    .sf-cat-link, .sf-subcat-link { min-height: 44px; font-size: 15px; }

    .sf-cat-open {
        display: inline-flex; align-items: center; gap: 8px; position: relative; flex: 0 0 auto;
        height: 44px; padding: 0 16px; border: 1px solid var(--sf-navy); border-radius: var(--sf-radius);
        background: var(--sf-surface); color: var(--sf-navy); font-size: 14px; font-weight: 700;
    }
    .sf-cat-open.has-filter::after {
        content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
        border-radius: 50%; background: var(--sf-primary);
    }
    .sf-catalog-toolbar { flex-wrap: nowrap; gap: 12px; }
    .sf-catalog-summary { min-width: 0; font-size: 13px; line-height: 1.35; }

    body.sf-sheet-open { overflow: hidden; }
    body.sf-sheet-open .sf-ai-fab { visibility: hidden; }
}

/* Phones: pin that toolbar to the top while scrolling the results. The header stops
   being sticky here — with search + vehicle picker it is ~200px, a quarter of a phone
   screen, and would leave no room for the toolbar. */
@media (max-width: 600px) {
    .sf-header { position: relative; } /* not sticky; keeps z-index so the menu drawer stays on top */
    .sf-catalog-toolbar {
        position: sticky; top: 0; z-index: 50;
        margin: 0 -16px; padding: 8px 16px;
        background: var(--sf-bg); border-bottom: 1px solid var(--sf-border);
    }
}

/* Home: featured products (2 rows from order history) */
.sf-home { max-width: var(--sf-content-max); margin: 0 auto; padding: 0 20px; }
.sf-featured { margin: 40px 0 8px; }
.sf-featured-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.sf-featured-head h2 { font-size: 22px; color: var(--sf-navy); margin: 0; }
.sf-featured-all { font-weight: 600; color: var(--sf-accent); }
.sf-featured-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.sf-featured-card { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease; }
.sf-featured-card:hover { box-shadow: var(--sf-shadow-md); transform: translateY(-2px); }
.sf-featured-img { display: block; aspect-ratio: 4/3; background: #fff; display: flex; align-items: center; justify-content: center; padding: 10px; }
.sf-featured-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-featured-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sf-featured-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--sf-navy);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-featured-title:hover { color: var(--sf-primary); }
.sf-featured-pricerow { display: flex; align-items: baseline; justify-content: space-between; }
.sf-featured-price { font-size: 18px; font-weight: 800; color: var(--sf-navy); }
.sf-featured-stock { font-size: 12px; font-weight: 600; }
.sf-featured-stock.in { color: var(--sf-success); }
.sf-featured-stock.out { color: var(--sf-danger); }
.sf-featured-add { width: 100%; }
@media (max-width: 1000px) { .sf-featured-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .sf-featured-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   AI Assistant (right drawer)
   ============================================================ */
.sf-ai-fab {
    position: fixed; right: 22px; bottom: 22px; z-index: 200;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--sf-primary); color: #fff; border: none; border-radius: 999px;
    padding: 12px 18px; font-weight: 700; font-size: 14px; cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.sf-ai-fab:hover { background: var(--sf-primary-hover); }
.sf-ai-overlay {
    position: fixed; inset: 0; background: rgba(10,18,32,0.45); z-index: 210;
    opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.sf-ai-overlay.open { opacity: 1; visibility: visible; }
.sf-ai-drawer {
    position: fixed; top: 0; right: 0; height: 100vh; width: 400px; max-width: 92vw; z-index: 220;
    background: var(--sf-surface); box-shadow: -8px 0 30px rgba(0,0,0,0.2);
    transform: translateX(100%); transition: transform .25s ease;
    display: flex; flex-direction: column;
}
.sf-ai-drawer.open { transform: translateX(0); }
/* Cowork-style header: assistant identity, not a chat title bar */
.sf-ai-head {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--sf-navy); color: #fff; padding: 14px 16px;
}
.sf-ai-ident { display: flex; align-items: center; gap: 11px; }
.sf-ai-avatar {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--sf-primary); color: #fff; font-size: 17px;
}
.sf-ai-ident-text { line-height: 1.25; }
.sf-ai-name { font-weight: 700; font-size: 15px; }
.sf-ai-status { font-size: 12px; color: rgba(255,255,255,0.72); display: flex; align-items: center; gap: 6px; }
.sf-ai-dot { width: 7px; height: 7px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 0 3px rgba(53,208,127,0.22); }
.sf-ai-close { background: none; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; opacity: .85; }
.sf-ai-close:hover { opacity: 1; }

/* Thread: a working document of turns, not left/right chat bubbles */
.sf-ai-thread { flex: 1; overflow-y: auto; padding: 18px 16px; background: var(--sf-bg); display: flex; flex-direction: column; gap: 16px; }

.sf-ai-welcome { text-align: center; padding: 14px 6px 4px; }
.sf-ai-welcome-icon {
    width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--sf-primary), #ff9a52); color: #fff; font-size: 24px;
    box-shadow: 0 8px 22px rgba(239,108,26,0.32);
}
.sf-ai-welcome h3 { color: var(--sf-navy); margin: 0 0 8px; font-size: 19px; }
.sf-ai-welcome p { color: var(--sf-text-muted); font-size: 14px; line-height: 1.6; margin: 0 0 14px; }

/* Suggestion chips — the "asks questions" / guided part */
.sf-ai-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sf-ai-followups { justify-content: flex-start; padding-left: 46px; }
.sf-ai-chip {
    border: 1px solid var(--sf-border); background: var(--sf-surface); color: var(--sf-navy);
    border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.sf-ai-chip:hover { border-color: var(--sf-primary); color: var(--sf-primary); background: rgba(239,108,26,0.06); }

/* Turns */
.sf-ai-turn.user { display: flex; justify-content: flex-end; }
.sf-ai-bubble-user {
    max-width: 85%; background: var(--sf-primary); color: #fff;
    padding: 10px 14px; border-radius: 14px 14px 4px 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap;
}
.sf-ai-turn.assistant { display: flex; gap: 10px; align-items: flex-start; }
.sf-ai-turn-avatar {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; margin-top: 2px;
    display: flex; align-items: center; justify-content: center;
    background: var(--sf-navy); color: var(--sf-primary); font-size: 14px;
}
.sf-ai-turn-body { flex: 1; min-width: 0; }
.sf-ai-turn-name { font-size: 12px; font-weight: 700; color: var(--sf-navy); margin-bottom: 4px; }
.sf-ai-turn-text {
    background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: 4px 14px 14px 14px;
    padding: 12px 14px; font-size: 14px; line-height: 1.6; color: var(--sf-text); white-space: pre-wrap;
}
.sf-ai-thinking { display: inline-flex; gap: 5px; padding: 12px 14px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: 4px 14px 14px 14px; }
.sf-ai-thinking span { width: 7px; height: 7px; border-radius: 50%; background: var(--sf-text-muted); opacity: .5; animation: sf-ai-blink 1.2s infinite ease-in-out; }
.sf-ai-thinking span:nth-child(2) { animation-delay: .2s; }
.sf-ai-thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes sf-ai-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Composer */
.sf-ai-composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--sf-border); background: var(--sf-surface); }
.sf-ai-composer textarea {
    flex: 1; resize: none; border: 1px solid var(--sf-border); border-radius: 18px;
    padding: 11px 15px; font: inherit; font-size: 14px; line-height: 1.4; outline: none; max-height: 132px;
}
.sf-ai-composer textarea:focus { border-color: var(--sf-primary); box-shadow: 0 0 0 3px rgba(239,108,26,0.12); }
.sf-ai-send { flex: 0 0 42px; height: 42px; border-radius: 50%; border: none; background: var(--sf-primary); color: #fff; cursor: pointer; font-size: 15px; transition: background .15s ease; }
.sf-ai-send:hover { background: var(--sf-primary-hover); }

/* Part result cards — shown under an assistant answer that looked up real parts */
.sf-ai-parts { display: flex; flex-direction: column; gap: 8px; padding-left: 40px; }
.sf-ai-part-card {
    display: flex; align-items: center; gap: 10px; padding: 8px;
    background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: 10px;
    text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease;
}
.sf-ai-part-card:hover { border-color: var(--sf-primary); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.sf-ai-part-img { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; border-radius: 6px; background: var(--sf-bg); }
.sf-ai-part-info { flex: 1; min-width: 0; }
.sf-ai-part-title { font-size: 13px; font-weight: 700; color: var(--sf-navy); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sf-ai-part-code { font-size: 11px; color: var(--sf-text-muted); margin-top: 2px; }
.sf-ai-part-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.sf-ai-part-price { font-size: 13px; font-weight: 700; color: var(--sf-primary); }
.sf-ai-part-stock { font-size: 11px; font-weight: 600; color: #2e9e5b; }
.sf-ai-part-stock.out { color: #c23434; }
.sf-ai-part-cta { flex: 0 0 auto; color: var(--sf-text-muted); font-size: 13px; }
.sf-ai-part-card:hover .sf-ai-part-cta { color: var(--sf-primary); }

@media (max-width: 520px) { .sf-ai-fab span { display: none; } .sf-ai-fab { padding: 14px; } .sf-ai-followups { padding-left: 0; } }

/* Attribute pills (CAPA, Halogen, Assembly, …) */
.sf-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.sf-pill {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
    padding: 3px 9px; border-radius: 999px;
    background: #eef2f7; color: var(--sf-navy); border: 1px solid var(--sf-border);
}
.sf-pill.capa { background: #e9f6ee; color: #157a3e; border-color: #bce9cd; }
.sf-pdp-pills { margin: 0 0 12px; }
.sf-pdp-pills .sf-pill { font-size: 12px; padding: 5px 12px; }

.sf-pdp-subdesc { font-size: 14px; line-height: 1.6; color: var(--sf-text-muted); margin: 0 0 14px; }
.sf-pdp-attribadges { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.sf-card-desc {
    font-size: 12.5px; line-height: 1.45; color: var(--sf-text-muted); margin: 0 0 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sf-attribadge { font-size: 13px; color: var(--sf-text-muted); }
.sf-pdp-price { margin: 6px 0 10px; }
.sf-price-amount { font-size: 30px; font-weight: 800; color: var(--sf-primary); }
.sf-price-call { font-size: 18px; font-weight: 600; color: var(--sf-text-muted); }
.sf-pdp-stock { font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.sf-pdp-stock.in { color: var(--sf-success); }
.sf-pdp-stock.out { color: var(--sf-danger); }

.sf-pdp-actions { display: flex; gap: 12px; align-items: center; }
.sf-qty { display: inline-flex; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); overflow: hidden; }
.sf-qty button {
    width: 40px; border: none; background: var(--sf-bg); font-size: 18px; cursor: pointer; color: var(--sf-text);
}
.sf-qty button:hover:not(:disabled) { background: var(--sf-border); }
.sf-qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.sf-qty-input { width: 54px; border: none; text-align: center; font-size: 15px; -moz-appearance: textfield; }
.sf-qty-input::-webkit-outer-spin-button, .sf-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sf-qty-warn { margin-top: 6px; font-size: 11.5px; color: #9a5b13; }

/* NOTE: intentionally does not redeclare background/color/padding/border here — those are
   owned by the base .sf-btn rule above (line ~451) so modifiers like .sf-btn-secondary/
   .sf-btn-danger/.sf-btn-outline (declared in between) aren't overridden by cascade order,
   and plain .sf-btn buttons without an explicit min-height (e.g. .sf-btn-cart) don't
   collapse to near-zero vertical padding. */
.sf-btn {
    border-radius: var(--sf-radius); cursor: pointer;
    font-weight: 700; font-size: 15px;
    transition: background 0.15s ease;
}
.sf-btn:disabled { background: var(--sf-border); color: var(--sf-text-muted); cursor: not-allowed; }
.sf-btn-cart { flex: 1; min-height: 46px; }
.sf-btn.is-added { background: var(--sf-success); }
.sf-btn-sm { font-size: 13px; padding: 8px 12px; min-height: 0; }

/* Fitment */
.sf-pdp-fitment {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 16px 18px;
    box-shadow: var(--sf-shadow-sm);
}
.sf-fitment-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sf-fitment-head h3 { font-size: 16px; margin: 0; }
.sf-fit-guarantee { font-size: 12px; color: var(--sf-success); font-weight: 600; }
.sf-fitment-sub { font-size: 13px; color: var(--sf-text-muted); margin: 6px 0 10px; }
.sf-fitment-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sf-fitment-table th { text-align: left; color: var(--sf-text-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--sf-border); }
.sf-fitment-table td { padding: 6px 8px; border-bottom: 1px solid var(--sf-bg); }
.sf-fit-check { color: var(--sf-success); font-weight: 700; }

/* Detail sections */
.sf-pdp-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 36px;
}
.sf-pdp-card {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 20px 22px;
    box-shadow: var(--sf-shadow-sm);
}
.sf-pdp-card h2 { font-size: 17px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--sf-bg); }
.sf-pdp-desc { line-height: 1.6; white-space: pre-line; color: var(--sf-text); }
.sf-pdp-empty { color: var(--sf-text-muted); font-style: italic; font-size: 14px; }
.sf-spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sf-spec-table th { text-align: left; color: var(--sf-text-muted); font-weight: 600; padding: 8px 0; width: 45%; vertical-align: top; }
.sf-spec-table td { padding: 8px 0; }
.sf-compat-list { list-style: none; padding: 0; margin: 8px 0 0; columns: 2; font-size: 14px; }
.sf-compat-list li { padding: 3px 0; break-inside: avoid; }

/* Related */
.sf-pdp-related { margin-top: 40px; }
.sf-pdp-related h2 { font-size: 20px; margin-bottom: 18px; }
.sf-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.sf-related-card {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--sf-surface); border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg); padding: 14px; text-decoration: none; color: var(--sf-text);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.sf-related-card:hover { box-shadow: var(--sf-shadow-md); transform: translateY(-2px); }
.sf-related-img { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.sf-related-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-related-title { font-size: 13px; line-height: 1.35; min-height: 34px; }
.sf-related-price { font-weight: 800; color: var(--sf-primary); }
.sf-related-add { align-self: stretch; }

/* Responsive */
@media (max-width: 980px) {
    .sf-pdp-top { grid-template-columns: 1fr 1fr; }
    .sf-pdp-fitment { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .sf-pdp-top { grid-template-columns: 1fr; }
    .sf-compat-list { columns: 1; }
    .sf-pdp-title { font-size: 22px; }
}

/* ============================================================
   Content pages (Terms/Returns/Shipping) + FAQ
   ============================================================ */
.sf-content-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 20px 56px;
    font-family: var(--sf-font);
    color: var(--sf-text);
}
.sf-content-article {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    padding: 32px 36px;
    box-shadow: var(--sf-shadow-sm);
}
.sf-content-article h1 { font-size: 28px; margin: 0 0 20px; }
.sf-content-body { line-height: 1.7; }
.sf-content-body h3 { font-size: 17px; margin: 24px 0 8px; color: var(--sf-accent); }
.sf-content-body p { margin: 0 0 12px; }
.sf-content-body ul { margin: 0 0 12px 20px; }

/* FAQ accordion */
.sf-faq-group { margin-bottom: 28px; }
.sf-faq-group > h2 { font-size: 18px; margin: 0 0 12px; color: var(--sf-accent); }
.sf-faq-item {
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    margin-bottom: 10px;
    background: var(--sf-surface);
    overflow: hidden;
}
.sf-faq-item > summary {
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 600;
    list-style: none;
    position: relative;
    padding-right: 42px;
}
.sf-faq-item > summary::-webkit-details-marker { display: none; }
.sf-faq-item > summary::after {
    content: "+";
    position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    font-size: 20px; color: var(--sf-primary); font-weight: 700;
}
.sf-faq-item[open] > summary::after { content: "−"; }
.sf-faq-answer { padding: 0 18px 16px; line-height: 1.6; color: var(--sf-text); }
.sf-pdp-faq .sf-faq-item { margin-bottom: 8px; }
.sf-faq-all { display: inline-block; margin-top: 10px; color: var(--sf-accent); text-decoration: none; font-weight: 600; }
.sf-faq-all:hover { text-decoration: underline; }

/* Catalog cards → product page links */
a.sf-card-image { display: block; cursor: pointer; }
.sf-card-title-link { color: inherit; text-decoration: none; }
.sf-card-title-link:hover { color: var(--sf-primary); text-decoration: underline; }

/* ============================================================
   Branded header / nav / footer  (matches mockup)
   ============================================================ */
/* Top utility bar */
.sf-topbar { background: var(--sf-navy); color: #cdd6e4; font-size: 12.5px; }
.sf-topbar-inner { max-width: var(--sf-content-max); margin: 0 auto; padding: 7px 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.sf-topbar-left { display: flex; gap: 22px; flex-wrap: wrap; }
.sf-topbar-left i { color: var(--sf-primary); margin-right: 5px; }
.sf-topbar-right { display: flex; gap: 22px; align-items: center; }
.sf-topbar-right a { color: #cdd6e4; }
.sf-topbar-right a:hover { color: #fff; }
.sf-topbar-right i { color: var(--sf-primary); margin-right: 5px; }

/* Header */
.sf-header { background: var(--sf-surface); border-bottom: 1px solid var(--sf-border); }
.sf-header-inner {
    max-width: var(--sf-content-max); margin: 0 auto; padding: 14px 20px;
    display: flex; align-items: center; gap: 28px;
}
.sf-logo { flex: 0 0 auto; }
.sf-logo img { height: 78px; width: auto; display: block; }
.sf-header-center { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sf-header-vehicle { display: flex; gap: 8px; }
.sf-header-search { display: flex; width: 100%; }
.sf-header-search-field { position: relative; flex: 1; display: flex; }
.sf-header-search input {
    flex: 1; border: 1px solid var(--sf-border); border-right: none;
    border-radius: var(--sf-radius) 0 0 var(--sf-radius); padding: 10px 34px 10px 14px; font-size: 14px; outline: none;
}
.sf-header-search input:focus { border-color: var(--sf-primary); }
.sf-header-search-clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; border-radius: 50%; border: none;
    background: var(--sf-border); color: var(--sf-navy); font-size: 15px; line-height: 1;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.sf-header-search-clear:hover { background: var(--sf-primary); color: #fff; }
.sf-header-search button {
    background: var(--sf-primary); color: #fff; border: none; width: 52px;
    border-radius: 0 var(--sf-radius) var(--sf-radius) 0; cursor: pointer; font-size: 16px;
}
.sf-header-search button:hover { background: var(--sf-primary-hover); }
.sf-header-actions { flex: 0 0 auto; display: flex; gap: 24px; }
.sf-header-action { display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--sf-navy); font-size: 12.5px; font-weight: 600; }
.sf-header-action i { font-size: 20px; }
.sf-header-action:hover { color: var(--sf-primary); }
.sf-cart-ico, .sf-wishlist-ico { position: relative; }
.sf-cart-count {
    position: absolute; top: -8px; right: -12px; background: var(--sf-primary); color: #fff;
    font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px;
    text-align: center; border-radius: 9px; padding: 0 4px;
}
.sf-cart-count[data-empty="1"] { display: none; }

/* Primary nav */
.sf-nav { background: var(--sf-surface); border-top: 1px solid var(--sf-border); }
.sf-nav-inner { max-width: var(--sf-content-max); margin: 0 auto; display: flex; align-items: stretch; }
.sf-nav-shop { background: var(--sf-primary); color: #fff; font-weight: 700; font-size: 13px;
    letter-spacing: .02em; padding: 0 22px; display: flex; align-items: center; gap: 9px; }
.sf-nav-shop:hover { background: var(--sf-primary-hover); color: #fff; }
.sf-nav-links { display: flex; align-items: center; gap: 26px; padding: 0 24px; flex: 1; }
.sf-nav-links a { color: var(--sf-navy); font-weight: 600; font-size: 13px; letter-spacing: .02em; padding: 13px 0; }
.sf-nav-links a:hover { color: var(--sf-primary); }
.sf-nav-ship { background: var(--sf-navy); color: #fff; font-weight: 700; font-size: 12.5px;
    padding: 0 22px; display: flex; align-items: center; gap: 8px; }
.sf-nav-ship i { color: var(--sf-primary); }

/* Footer trust strip */
.sf-trust-strip { background: var(--sf-navy-2); color: #e5e9f0; border-top: 3px solid var(--sf-primary); }
.sf-trust-inner { max-width: var(--sf-content-max); margin: 0 auto; padding: 22px 20px;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.sf-trust-item { display: flex; gap: 12px; align-items: flex-start; }
.sf-trust-item i { color: var(--sf-primary); font-size: 22px; margin-top: 2px; }
.sf-trust-item strong { display: block; font-size: 13px; }
.sf-trust-item span { display: block; font-size: 11.5px; color: #a9b4c6; margin-top: 2px; }

@media (max-width: 900px) {
    .sf-header-inner { flex-wrap: wrap; }
    .sf-header-center { order: 3; flex-basis: 100%; }
    .sf-topbar-left span:nth-child(n+3) { display: none; }
    .sf-nav-inner { flex-wrap: wrap; }
    .sf-nav-ship { display: none; }
    .sf-trust-inner { grid-template-columns: repeat(2, 1fr); }
}

/* Override legacy circular cart style for the new header layout */
.sf-header-action.sf-cart { width: auto; height: auto; background: none; border-radius: 0; flex-direction: column; }
.sf-header-action.sf-cart:hover { background: none; color: var(--sf-primary); }

/* Navy section headings to match the mockup */
.sf-pdp-card h2, .sf-content-article h1, .sf-faq-group > h2, .sf-pdp-related h2,
.sf-fitment-head h3, .sf-pdp-title { color: var(--sf-navy); }
.sf-content-body h3 { color: var(--sf-navy); }

/* Product badge pills (CAPA / warranty / shipping) */
.sf-pdp-attribadges { gap: 10px; }
.sf-attribadge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff5ee; color: var(--sf-navy); border: 1px solid #f6d8c2;
    border-radius: 6px; padding: 6px 10px; font-size: 12.5px; font-weight: 600;
}
.sf-attribadge i { color: var(--sf-primary); }

/* Fitment "guaranteed to fit" + checks use success green */
.sf-fit-guarantee, .sf-fit-check, .sf-pdp-stock.in { color: var(--sf-success); }

/* Vehicle fitment box header bar (navy) like the mockup */
.sf-pdp-fitment { padding: 0; overflow: hidden; }
.sf-fitment-head { background: var(--sf-navy); color: #fff; padding: 12px 16px; margin: 0; }
.sf-fitment-head h3 { color: #fff; }
.sf-fitment-sub, .sf-fitment-table { padding-left: 16px; padding-right: 16px; }
.sf-fitment-sub { margin-top: 12px; }
.sf-pdp-fitment .sf-pdp-empty { padding: 16px; }

/* PDP feature list + why-buy + full-width FAQ */
.sf-feature-list { list-style: none; padding: 0; margin: 0; }
.sf-feature-list li { position: relative; padding: 5px 0 5px 24px; font-size: 14px; line-height: 1.5; }
.sf-feature-list li::before {
    content: "\2713"; color: var(--sf-primary); font-weight: 700;
    position: absolute; left: 0; top: 5px;
}
.sf-why-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.sf-why-list li { display: flex; gap: 12px; align-items: flex-start; }
.sf-why-list li i { color: var(--sf-primary); font-size: 18px; margin-top: 2px; }
.sf-why-list strong { display: block; font-size: 14px; color: var(--sf-navy); }
.sf-why-list span { display: block; font-size: 12.5px; color: var(--sf-text-muted); }

.sf-pdp-faq { margin-top: 20px; }
.sf-faq-cols { columns: 2; column-gap: 20px; }
.sf-faq-cols .sf-faq-item { break-inside: avoid; }
@media (max-width: 720px) { .sf-faq-cols { columns: 1; } }

/* ============================================================
   Page H1 + button variants (shared)
   ============================================================ */
.sf-page-h1 { font-size: 26px; color: var(--sf-navy); margin: 6px 0 18px; }
.sf-catalog-page, .sf-cart-page { max-width: var(--sf-content-max); margin: 0 auto; padding: 16px 20px 48px; }
.sf-btn-outline { background: #fff; color: var(--sf-navy); border: 1px solid var(--sf-border); font-weight: 600; padding: 10px 16px; border-radius: var(--sf-radius); font-size: 13.5px; }
.sf-btn-outline:hover { border-color: var(--sf-primary); color: var(--sf-primary); background: #fff; }
.sf-btn-navy { background: var(--sf-navy); color: #fff; padding: 10px 16px; border-radius: var(--sf-radius); font-weight: 700; font-size: 13.5px; }
.sf-btn-navy:hover { background: var(--sf-navy-2); color: #fff; }
.sf-btn-block { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 10px; }
.sf-btn-paypal { background: var(--sf-paypal); color: #253b80; }
.sf-btn-paypal:hover { background: #f0b429; color: #253b80; }

/* Button anchors must not inherit the body link color (.sf-body a wins on
   specificity over .sf-btn*, which turned white button text dark). */
.sf-body a.sf-btn,
.sf-body a.sf-btn-navy { color: #fff; }
.sf-body a.sf-btn-navy:hover { color: #fff; }
.sf-body a.sf-btn-outline { color: var(--sf-navy); }
.sf-body a.sf-btn-outline:hover { color: var(--sf-primary); }
.sf-body a.sf-btn-paypal,
.sf-body a.sf-btn-paypal:hover { color: #253b80; }

/* ============================================================
   Cart page
   ============================================================ */
/* VIN gate: header, then a VIN field + Verify button on one row, opt-out checkbox,
   and the business Tax ID below a divider. Stacked in one column at every width. */
.sf-cart-vin {
    display: flex; flex-direction: column; gap: 16px;
    background: #fff8e6; border: 1px solid #f4d68a; border-radius: var(--sf-radius-lg);
    padding: 18px 20px; margin-bottom: 20px;
}
.sf-cart-vin-msg { display: flex; gap: 12px; align-items: flex-start; }
.sf-cart-vin-msg > i { color: #d99100; font-size: 22px; line-height: 1.2; flex: 0 0 auto; }
.sf-cart-vin-msg strong { display: block; color: var(--sf-navy); }
.sf-cart-vin-msg span { display: block; font-size: 13px; color: var(--sf-text-muted); }
.sf-cart-vin.is-invalid { border-color: #d1495b; box-shadow: 0 0 0 3px rgba(209,73,91,.14); }
.sf-vin-entry { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 560px; }
.sf-vin-field { flex: 1 1 auto; min-width: 0; }
.sf-body .sf-field > input.sf-vin-input { text-transform: uppercase; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.sf-body .sf-field > input.sf-vin-input:disabled { background: #f3f4f6; color: var(--sf-text-muted); border-color: #e5e7eb; }
.sf-vin-check { display: flex; align-items: center; gap: 10px; width: fit-content; font-size: 14px; color: var(--sf-text); cursor: pointer; }
.sf-vin-check input { margin: 0; flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--sf-primary); }
.sf-vin-disclaimer .sf-vin-check { align-items: flex-start; }
.sf-vin-disclaimer .sf-vin-check input { margin-top: 1px; }
.sf-vin-disclaimer[hidden] { display: none; }
.sf-vin-disclaimer { display: flex; flex-direction: column; gap: 9px; background: var(--sf-surface); border: 1px solid var(--sf-primary); border-radius: 8px; padding: 12px 14px; }
.sf-vin-disc-text { margin: 0; font-size: 13px; color: var(--sf-navy); }
.sf-vin-error { color: #d1495b; font-size: 13px; font-weight: 600; }
.sf-vin-error:empty { display: none; }

/* Checkout vehicle recap (read-only carry-over from the cart's VIN gate) */
.sf-co-vehicle p { margin: 0 0 8px; font-size: 13.5px; color: var(--sf-text); }
.sf-co-vehicle ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--sf-text); }
.sf-co-vehicle-warn { color: #b45309; font-weight: 600; }
.sf-co-vehicle-missing { border-color: #d1495b; }
.sf-co-vehicle-missing p { color: #d1495b; }

/* VIN fitment verification */
.sf-vin-inputrow { display: flex; gap: 10px; align-items: stretch; }
.sf-vin-verify {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto;
    height: 48px; padding: 0 20px; border: none; border-radius: var(--sf-radius);
    background: var(--sf-primary); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.sf-vin-verify:hover { background: var(--sf-primary-dark, #c85a12); }
.sf-vin-verify:disabled, .sf-vin-verify:disabled:hover { background: #d1d5db; color: #6b7280; cursor: not-allowed; }
.sf-fit-summary { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; border-radius: 8px; padding: 9px 12px; }
.sf-fit-summary.checking { color: var(--sf-text-muted); }
.sf-fit-summary.ok { background: #ebfbee; color: #1f9d57; }
.sf-fit-summary.warn { background: #fff4e6; color: #b9560a; }
.sf-cart-fit { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; margin: 4px 0 2px; }
.sf-cart-fit.fits { color: #1f9d57; }
.sf-cart-fit.nofit { color: #b9560a; }
.sf-fit-ack { background: #fff4e6; border: 1px solid #f0b775; border-radius: 8px; padding: 10px 12px; font-weight: 600; color: #8a4b08; }

.sf-cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.sf-cart-main { min-width: 0; }

.sf-cart-table { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); overflow: hidden; }
.sf-cart-thead, .sf-cart-row { display: grid; grid-template-columns: 1fr 110px 150px 110px; align-items: center; }
.sf-cart-thead { background: var(--sf-bg); padding: 12px 18px; font-size: 12px; font-weight: 700; color: var(--sf-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.sf-cart-thead span:nth-child(n+2), .sf-cart-cell-price, .sf-cart-cell-qty, .sf-cart-cell-total { text-align: center; }
.sf-cart-row { padding: 18px; border-top: 1px solid var(--sf-border); }
.sf-cart-cell-product { display: flex; gap: 14px; }
.sf-cart-img { width: 96px; height: 96px; flex: 0 0 96px; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); overflow: hidden; display: flex; align-items: center; justify-content: center; background: #fff; }
.sf-cart-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-cart-name { font-size: 15px; margin: 0 0 6px; color: var(--sf-navy); }
.sf-cart-name a { color: var(--sf-navy); }
.sf-cart-name a:hover { color: var(--sf-primary); }
.sf-cart-attr { font-size: 12.5px; color: var(--sf-text-muted); }
.sf-cart-stock { font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.sf-cart-stock.in { color: var(--sf-success); }
.sf-cart-stock.out { color: var(--sf-danger); }
.sf-cart-remove { background: none; border: none; color: var(--sf-text-muted); font-size: 12.5px; padding: 6px 0 0; cursor: pointer; }
.sf-cart-remove:hover { color: var(--sf-danger); }
.sf-cart-cell-price, .sf-cart-cell-total { font-weight: 700; color: var(--sf-navy); }
.sf-cart-cell-total { color: var(--sf-primary); }
.sf-cart-cell-qty .sf-qty { margin: 0 auto; }
.sf-cart-qty-warn { margin-top: 6px; font-size: 11.5px; color: #9a5b13; text-align: center; }

.sf-cart-line-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.sf-cart-line-actions .sf-cart-remove { margin: 0; }
.sf-cart-wishlist { background: none; border: none; color: var(--sf-text-muted); font-size: 12.5px; padding: 0; cursor: pointer; }
.sf-cart-wishlist:hover { color: var(--sf-primary); }
.sf-cart-wishlist:disabled { opacity: .6; cursor: default; }

.sf-flash { background: #eafaf1; border: 1px solid var(--sf-success); color: #1a6b3f; border-radius: var(--sf-radius); padding: 12px 16px; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; }

/* ── Wishlist page ───────────────────────────────────── */
.sf-wishlist-thead, .sf-wishlist-row { display: grid; grid-template-columns: 1fr 110px 150px 200px; align-items: center; }
.sf-wishlist-thead { background: var(--sf-bg); padding: 12px 18px; font-size: 12px; font-weight: 700; color: var(--sf-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.sf-wishlist-thead span:nth-child(n+2) { text-align: center; }
.sf-wishlist-row.sf-cart-row { padding: 18px; }
.sf-wishlist-warn { margin-top: 6px; font-size: 12px; font-weight: 600; color: #9a5b13; }
.sf-wishlist-error { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--sf-danger); }
.sf-wishlist-actions-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sf-wishlist-actions-cell .sf-cart-remove { margin: 0; }

.sf-cart-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.sf-cart-assurance { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: 16px 18px; }
.sf-cart-assurance > div { display: flex; gap: 12px; align-items: flex-start; }
.sf-cart-assurance i { color: var(--sf-primary); font-size: 20px; margin-top: 2px; }
.sf-cart-assurance strong { display: block; font-size: 13.5px; color: var(--sf-navy); }
.sf-cart-assurance span { display: block; font-size: 12px; color: var(--sf-text-muted); }

.sf-cart-suggest { margin-top: 24px; }
.sf-cart-suggest > h2 { font-size: 16px; color: var(--sf-navy); margin-bottom: 14px; }
.sf-suggest-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.sf-suggest-card { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.sf-suggest-img { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.sf-suggest-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-suggest-title { font-size: 12px; line-height: 1.35; color: var(--sf-text); min-height: 32px; }
.sf-suggest-title:hover { color: var(--sf-primary); }
.sf-suggest-price { font-weight: 700; color: var(--sf-primary); font-size: 13px; }
.sf-suggest-add { width: 100%; }

/* Order summary */
.sf-cart-summary { position: sticky; top: 90px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: 18px; box-shadow: var(--sf-shadow-sm); }
.sf-ssl { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--sf-border); margin-bottom: 14px; }
.sf-ssl i { color: var(--sf-success); font-size: 20px; }
.sf-ssl strong { display: block; font-size: 13px; color: var(--sf-navy); }
.sf-ssl span { display: block; font-size: 11.5px; color: var(--sf-text-muted); }
.sf-summary-h { font-size: 16px; color: var(--sf-navy); margin: 0 0 12px; }
.sf-summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.sf-summary-row.muted { color: var(--sf-text-muted); font-size: 13px; }
.sf-summary-divider { height: 1px; background: var(--sf-border); margin: 8px 0; }
.sf-summary-row.total { font-size: 18px; font-weight: 800; color: var(--sf-navy); }
.sf-freeship { background: #eafaf0; border: 1px solid #bce9cd; border-radius: var(--sf-radius); padding: 10px 12px; margin: 12px 0; font-size: 12.5px; color: #157a3e; }
.sf-freeship.qualified { text-align: center; font-weight: 600; }
.sf-freeship-msg i { margin-right: 5px; }
.sf-freeship-bar { height: 7px; background: #cdeddb; border-radius: 4px; margin-top: 8px; overflow: hidden; }
.sf-freeship-bar span { display: block; height: 100%; background: var(--sf-success); }
.sf-secure-note { text-align: center; font-size: 12px; color: var(--sf-text-muted); margin-top: 8px; }
.sf-accept { text-align: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--sf-border); }
.sf-accept > span { font-size: 12px; color: var(--sf-text-muted); }
.sf-accept-icons { display: flex; justify-content: center; gap: 8px; font-size: 26px; color: var(--sf-navy); margin-top: 6px; }
.sf-summary-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.sf-summary-badges > div { display: flex; gap: 8px; align-items: center; background: var(--sf-bg); border-radius: var(--sf-radius); padding: 8px; }
.sf-summary-badges i { color: var(--sf-primary); font-size: 16px; }
.sf-summary-badges strong { display: block; font-size: 12px; color: var(--sf-navy); }
.sf-summary-badges span { display: block; font-size: 10.5px; color: var(--sf-text-muted); }

@media (max-width: 960px) {
    .sf-cart-layout { grid-template-columns: 1fr; }
    .sf-suggest-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Contact page (hero + features) — full-bleed inside .sf-main
   ============================================================ */
.sf-contact {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: -32px 0;          /* cancel .sf-main padding so it's flush to nav/footer */
}
.sf-contact-hero {
    background:
        linear-gradient(120deg, rgba(11,20,38,0.94), rgba(20,35,61,0.86)),
        radial-gradient(circle at 80% 40%, #2a4675 0%, #12233d 55%, #0b1426 100%);
    color: #fff;
    text-align: center;
    padding: 56px 20px 64px;
}
.sf-contact-hero-inner { max-width: 760px; margin: 0 auto; }
.sf-contact-hero h1 {
    color: #fff; font-size: 40px; font-weight: 800; letter-spacing: .04em; margin: 0;
}
.sf-contact-underline { display: block; width: 90px; height: 4px; background: var(--sf-primary); border-radius: 2px; margin: 12px auto 20px; }
.sf-contact-hero p { color: #cdd6e4; font-size: 15px; line-height: 1.6; max-width: 620px; margin: 0 auto; }
.sf-contact-emailicon {
    width: 84px; height: 84px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center; margin: 34px auto 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.sf-contact-emailicon i { color: var(--sf-primary); font-size: 34px; }
.sf-contact-emaillabel { color: var(--sf-primary); font-weight: 700; letter-spacing: .12em; font-size: 13px; }
/* Keep the support email white in every state — outrank the dark `.sf-body a` rule
   (0,1,1) that would otherwise render it dark on the navy hero. */
.sf-body a.sf-contact-email,
.sf-body a.sf-contact-email:hover,
.sf-body a.sf-contact-email:focus,
.sf-body a.sf-contact-email:visited { display: inline-block; color: #fff; font-size: 26px; font-weight: 800; margin-top: 8px; }

.sf-contact-features { background: var(--sf-bg); border-top: 1px solid var(--sf-border); }
.sf-contact-features-inner {
    max-width: var(--sf-content-max); margin: 0 auto; padding: 34px 20px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.sf-cf-item { display: flex; gap: 14px; align-items: flex-start; }
.sf-cf-item + .sf-cf-item { border-left: 1px solid var(--sf-border); padding-left: 24px; }
.sf-cf-icon {
    width: 52px; height: 52px; border-radius: 50%; flex: 0 0 52px;
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px;
}
.sf-cf-icon.blue { background: #1c3d7a; }
.sf-cf-icon.orange { background: var(--sf-primary); }
.sf-cf-text h3 { font-size: 14px; font-weight: 800; letter-spacing: .04em; margin: 2px 0 5px; }
.sf-cf-text h3.navy { color: var(--sf-navy); }
.sf-cf-text h3.orange { color: var(--sf-primary); }
.sf-cf-text p { font-size: 12.5px; color: var(--sf-text-muted); line-height: 1.5; margin: 0; }

@media (max-width: 900px) {
    .sf-contact-features-inner { grid-template-columns: repeat(2, 1fr); }
    .sf-cf-item:nth-child(odd) { border-left: none; padding-left: 0; }
}
@media (max-width: 520px) {
    .sf-contact-features-inner { grid-template-columns: 1fr; }
    .sf-cf-item { border-left: none !important; padding-left: 0 !important; }
    .sf-contact-hero h1 { font-size: 30px; }
    .sf-contact-email { font-size: 20px; }
}

/* ============================================================
   About page (hero + quality + by-the-numbers) — full-bleed
   ============================================================ */
.sf-about {
    width: 100vw; position: relative; left: 50%; transform: translateX(-50%);
    margin: -32px 0;
}
.sf-about-hero {
    background:
        linear-gradient(100deg, rgba(11,20,38,0.96) 40%, rgba(15,26,46,0.72) 100%),
        radial-gradient(circle at 85% 30%, #2c4a7d 0%, #14233d 55%, #0b1426 100%);
    color: #fff;
    padding: 60px 20px;
}
.sf-about-hero-inner { max-width: var(--sf-content-max); margin: 0 auto; }
.sf-about-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: #cdd6e4; margin-bottom: 12px; }
.sf-about-hero h1 { color: #fff; font-size: 40px; font-weight: 800; line-height: 1.15; margin: 0 0 18px; max-width: 620px; }
.sf-about-hero h1 span { color: var(--sf-primary); }
.sf-about-hero p { color: #cdd6e4; font-size: 15px; line-height: 1.7; max-width: 560px; margin: 0; }

.sf-about-quality { background: var(--sf-surface); }
.sf-about-quality-inner {
    max-width: var(--sf-content-max); margin: 0 auto; padding: 44px 20px;
    display: grid; grid-template-columns: minmax(260px, 320px) 1fr; gap: 40px; align-items: start;
}
.sf-about-copy h2 { font-size: 17px; color: var(--sf-navy); letter-spacing: .02em; margin: 0 0 14px; }
.sf-about-copy p { font-size: 13.5px; color: var(--sf-text-muted); line-height: 1.65; margin: 0 0 12px; }
.sf-about-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sf-af { text-align: center; padding: 0 8px; }
.sf-af + .sf-af { border-left: 1px solid var(--sf-border); }
.sf-af-icon i { font-size: 40px; color: var(--sf-navy); }
.sf-af h3 { font-size: 13px; font-weight: 800; letter-spacing: .03em; color: var(--sf-navy); margin: 14px 0 8px; }
.sf-af p { font-size: 12px; color: var(--sf-text-muted); line-height: 1.5; margin: 0; }

.sf-about-numbers { background: var(--sf-navy); border-top: 4px solid var(--sf-primary); }
.sf-about-numbers-inner { max-width: var(--sf-content-max); margin: 0 auto; padding: 40px 20px; }
.sf-about-numbers-head { color: #cdd6e4; font-weight: 800; letter-spacing: .1em; font-size: 13px; margin-bottom: 24px; }
.sf-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sf-stat { text-align: center; padding: 0 10px; }
.sf-stat + .sf-stat { border-left: 1px solid rgba(255,255,255,0.12); }
.sf-stat-num { font-size: 38px; font-weight: 800; color: var(--sf-primary); line-height: 1; }
.sf-stat-label { color: #fff; font-weight: 800; letter-spacing: .04em; font-size: 13px; margin: 8px 0 6px; }
.sf-stat-sub { color: #a9b4c6; font-size: 12px; line-height: 1.5; }

@media (max-width: 900px) {
    .sf-about-quality-inner { grid-template-columns: 1fr; }
    .sf-about-features { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
    .sf-af:nth-child(odd) { border-left: none; }
    .sf-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
    .sf-stat:nth-child(odd) { border-left: none; }
}
@media (max-width: 520px) {
    .sf-about-hero h1 { font-size: 30px; }
    .sf-about-features, .sf-stat-grid { grid-template-columns: 1fr; }
    .sf-af, .sf-stat { border-left: none !important; }
}
@media (max-width: 640px) {
    .sf-cart-thead, .sf-wishlist-thead { display: none; } /* wishlist header row overflowed to 553px on a 375px phone */
    .sf-cart-row { grid-template-columns: 1fr; gap: 10px; }
    .sf-cart-cell-price, .sf-cart-cell-qty, .sf-cart-cell-total { text-align: left; display: flex; justify-content: space-between; }
    .sf-cart-cell-price::before, .sf-cart-cell-qty::before, .sf-cart-cell-total::before { content: attr(data-label); font-weight: 600; color: var(--sf-text-muted); }
    .sf-cart-cell-qty .sf-qty { margin: 0; }
    .sf-cart-assurance { grid-template-columns: 1fr; }
    .sf-wishlist-row { grid-template-columns: 1fr; gap: 10px; }
    .sf-wishlist-row .sf-cart-cell-price, .sf-wishlist-row .sf-cart-cell-qty { text-align: left; display: flex; justify-content: space-between; }
    .sf-wishlist-row .sf-cart-cell-price::before, .sf-wishlist-row .sf-cart-cell-qty::before { content: attr(data-label); font-weight: 600; color: var(--sf-text-muted); }
    .sf-wishlist-row .sf-cart-cell-qty .sf-qty { margin: 0; }
    .sf-wishlist-actions-cell { flex-direction: row; justify-content: space-between; }
}

/* ============================================================
   Uniform "Add to Cart" buttons across every product card
   (catalog, home featured, cart suggestions, PDP related)
   ============================================================ */
.sf-card-add,
.sf-featured-add,
.sf-suggest-add,
.sf-related-add {
    width: 100%;
    min-height: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    align-self: stretch;
    /* Push the button to the bottom so it aligns across cards regardless of
       title length or a missing price. Cards stretch to equal height in the grid. */
    margin-top: auto;
}

/* Add-to-Cart shares its row with the wishlist icon button (.sf-card-actions) on the
   catalog grid and Home featured strip — override the uniform rule's width:100%/flex:none
   above (same specificity, so this needs the extra .sf-card-actions ancestor class to win)
   so it shares space instead of pushing the wishlist button out of the card. */
.sf-card-actions .sf-card-add,
.sf-card-actions .sf-featured-add,
.sf-card-actions .sf-related-add {
    width: auto;
    flex: 1;
    min-width: 0;
}

/* ============================================================
   Standalone Payment page (Modules/Public/Payment)
   ============================================================ */

.sf-pay-header {
    background: var(--sf-surface);
    border-bottom: 1px solid var(--sf-border);
}

.sf-pay-header-inner {
    max-width: var(--sf-content-max);
    margin: 0 auto;
    padding: 26px 20px;
    display: flex;
    justify-content: center;
}

.sf-pay-header-text {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sf-navy);
}

.sf-pay-shell {
    max-width: var(--sf-content-max);
    margin: 0 auto;
    padding: 28px 20px 64px;
}

.sf-pay-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px; /* minmax: the parts table must not widen the column */
    gap: 24px;
    align-items: start;
}

.sf-pay-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.sf-pay-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.sf-pay-title-block { display: flex; align-items: center; gap: 14px; }
.sf-pay-mark { height: 56px; width: auto; display: block; flex-shrink: 0; }

.sf-pay-heading h1 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -0.01em; }
.sf-pay-sub { margin-top: 6px; font-size: 14px; color: var(--sf-text-muted); }

.sf-pay-badge {
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.sf-pay-badge-pending { background: #fdf0e6; color: #c25a12; border-color: #f6d3b6; }
.sf-pay-badge-paid { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.sf-pay-badge-canceled { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.sf-pay-badge-refunded { background: #fdf0e6; color: #c25a12; border-color: #f6d3b6; }
.sf-pay-refunded-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #fdf0e6; color: #c25a12; border: 1px solid #f6d3b6; vertical-align: middle; }
.sf-pay-badge-muted { background: var(--sf-bg); color: var(--sf-text-muted); border-color: var(--sf-border); }

.sf-pay-alert {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: var(--sf-radius);
    padding: 14px 18px;
    font-size: 14px;
}

.sf-pay-alert-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.sf-pay-card {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    overflow: hidden;
}

.sf-pay-card-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--sf-border);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--sf-navy);
    text-transform: uppercase;
}

.sf-pay-card-head-split { display: flex; justify-content: space-between; }

.sf-pay-info-grid {
    padding: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}

.sf-pay-full { grid-column: 1 / -1; }
.sf-pay-divider { grid-column: 1 / -1; height: 1px; background: var(--sf-border); }

.sf-pay-label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sf-text-muted);
    font-weight: 700;
}

.sf-pay-value { margin-top: 5px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.sf-pay-value.sf-pay-normal { font-weight: 400; }
.sf-pay-value.sf-pay-muted { color: var(--sf-text-muted); font-weight: 400; }
.sf-pay-muted-sm { font-size: 14px; color: var(--sf-text-muted); }

.sf-pay-table-wrap { overflow-x: auto; }

.sf-pay-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.sf-pay-table thead tr {
    background: var(--sf-bg);
    color: var(--sf-text-muted);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
}

.sf-pay-table th, .sf-pay-table td { padding: 12px 16px; }
.sf-pay-table tbody tr { border-top: 1px solid var(--sf-border); }

.sf-pay-right { text-align: right; }
.sf-pay-strong { font-weight: 700; }
.sf-pay-muted { color: var(--sf-text-muted); }
.sf-pay-empty-row { text-align: center; padding: 24px; color: var(--sf-text-muted); }

.sf-pay-remove-btn {
    background: none; border: 1px solid var(--sf-border); border-radius: var(--sf-radius);
    width: 32px; height: 32px; color: var(--sf-danger); cursor: pointer;
}
.sf-pay-remove-btn:hover:not(:disabled) { background: #fdecec; border-color: var(--sf-danger); }
.sf-pay-remove-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.sf-pay-summary {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.sf-pay-summary-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    font-size: 15px;
}

.sf-pay-row { display: flex; justify-content: space-between; color: var(--sf-text-muted); }
.sf-pay-row span:last-child { color: var(--sf-text); font-weight: 700; }

.sf-pay-summary-divider { height: 1px; background: var(--sf-border); }

.sf-pay-row-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 900;
    font-size: 16px;
    color: var(--sf-text);
}

.sf-pay-row-total span:last-child { font-size: 24px; color: var(--sf-primary); font-weight: 900; }

.sf-pay-error { color: var(--sf-danger); font-size: 13px; min-height: 1.1em; }

.sf-pay-btn-pay { margin-top: 8px; width: 100%; justify-content: center; padding: 15px; font-size: 15px; }
.sf-pay-btn-close { width: 100%; justify-content: center; padding: 13px; }

.sf-pay-secure { margin-top: 4px; text-align: center; font-size: 12.5px; color: var(--sf-text-muted); }

.sf-pay-iframe-card {
    background: var(--sf-surface);
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius-lg);
    overflow: hidden;
    padding-bottom: 20px;
}

.sf-pay-iframe-note { padding: 0 22px; margin: 16px 0; font-size: 14px; color: var(--sf-text-muted); }
.sf-pay-iframe-card .sf-iframe-container { margin: 0 22px; width: auto; }
.sf-pay-iframe-card .sf-btn { margin: 16px 22px 0; }

@media (max-width: 860px) {
    .sf-pay-layout { grid-template-columns: minmax(0, 1fr); }
    .sf-pay-info-grid { grid-template-columns: minmax(0, 1fr); }
    .sf-pay-summary { position: static; }
}

/* Order Lookup + Return/RMA steps (search form, part picker, RMA request form) */

.sf-pay-shell-narrow { max-width: 560px; }
.sf-pay-shell-medium { max-width: 900px; }

.sf-pay-form-body { padding: 22px; }
.sf-pay-form-body > p { margin: 0 0 16px; }

.sf-pay-actions-row {
    padding: 18px 22px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.sf-pay-actions-row .sf-btn { width: auto; padding: 12px 22px; margin-top: 0; }

.sf-pay-btn-auto { width: auto; }

.sf-pay-select-cell { width: 34px; text-align: center; }

.sf-pay-back-link {
    font-size: 13px;
    color: var(--sf-text-muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}
.sf-pay-back-link:hover { color: var(--sf-primary); }

.sf-pay-required { color: var(--sf-primary); }

.sf-pay-input {
    margin-top: 6px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    padding: 11px 13px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--sf-text);
}
.sf-pay-input:focus { outline: none; border-color: var(--sf-primary); }
.sf-pay-input[readonly] { background: var(--sf-bg); color: var(--sf-text-muted); }

.sf-pay-radio-inline {
    margin-top: 8px;
    display: flex;
    gap: 28px;
    font-size: 14.5px;
    flex-wrap: wrap;
}
.sf-pay-radio-inline label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.sf-pay-question-row {
    padding: 18px 22px;
    border-top: 1px solid var(--sf-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.sf-pay-question-row.unanswered { background: #fef2f2; }
.sf-pay-question-text { font-size: 14.5px; }
.sf-pay-question-options { display: flex; gap: 24px; font-size: 14px; flex-shrink: 0; }
.sf-pay-question-options label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.sf-pay-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 35, 63, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.sf-pay-modal {
    background: var(--sf-surface);
    border-radius: var(--sf-radius-lg);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
}

.sf-pay-modal-body { padding: 24px 24px 0; }
.sf-pay-modal-title { font-weight: 900; font-size: 18px; color: var(--sf-navy); }
.sf-pay-modal-message { margin-top: 10px; font-size: 14.5px; color: var(--sf-text-muted); line-height: 1.5; }
.sf-pay-modal-actions { padding: 22px 24px 24px; display: flex; gap: 12px; justify-content: flex-end; }
.sf-pay-modal-actions .sf-btn { width: auto; padding: 11px 20px; font-size: 14px; margin-top: 0; }

/* ============================================================
   Mobile layout (#36899 menu + AI floater, #36900 forms)
   Nothing on the public site may be wider than the viewport: the nav bar becomes an
   off-canvas drawer, the AI button stays pinned inside the screen, and every form
   collapses to one column with 16px inputs (iOS zooms the page on smaller text).
   ============================================================ */

/* Drawer-only pieces stay out of the desktop nav bar. */
.sf-menu-toggle, .sf-nav-head, .sf-nav-extra, .sf-nav-overlay { display: none; }

/* A 1fr track grows to its input's intrinsic width (~200px+), which pushed the
   two-column form grids past the screen edge; minmax(0, 1fr) lets them shrink. */
.sf-co-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-co-grid input, .sf-co-grid select { width: 100%; min-width: 0; }

/* Closed AI drawer is hidden outright (not just translated off-screen), so it can't
   widen the page or take keyboard focus. */
.sf-ai-drawer { visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.sf-ai-drawer.open { visibility: visible; transition: transform .25s ease; }

@media (max-width: 900px) {
    .sf-menu-toggle {
        display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
        width: 44px; height: 44px; margin-left: -8px; border: none; background: none;
        border-radius: var(--sf-radius); color: var(--sf-navy); font-size: 24px;
    }
    .sf-menu-toggle:hover { color: var(--sf-primary); }
    .sf-logo img { height: 56px; }

    /* Nav bar → left drawer */
    .sf-nav {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 2;
        width: min(320px, 85vw); border-top: none;
        display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 4px 0 24px rgba(0,0,0,0.2);
        transform: translateX(-100%); visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }
    .sf-nav.open { transform: translateX(0); visibility: visible; transition: transform .25s ease; }
    .sf-nav-overlay {
        display: block; position: fixed; inset: 0; z-index: 1; background: rgba(10,18,32,0.45);
        opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
    }
    .sf-nav-overlay.open { opacity: 1; visibility: visible; transition: opacity .2s ease; }
    .sf-nav-head {
        display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto;
        padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--sf-border);
    }
    .sf-nav-logo img { height: 40px; width: auto; display: block; }
    .sf-nav-close {
        width: 44px; height: 44px; border: none; background: none; border-radius: var(--sf-radius);
        color: var(--sf-navy); font-size: 30px; line-height: 1;
    }
    .sf-nav-inner { flex-direction: column; flex-wrap: nowrap; align-items: stretch; max-width: none; margin: 0; }
    .sf-nav-shop { min-height: 52px; padding: 0 16px; }
    .sf-nav-links {
        flex: none; flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px 0; border-bottom: 1px solid var(--sf-border);
    }
    .sf-nav-links a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; font-size: 14px; }
    .sf-nav-extra { display: flex; flex-direction: column; padding: 8px 0; }
    .sf-body .sf-nav-extra a {
        display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px;
        color: var(--sf-text); font-size: 14px; font-weight: 500;
    }
    .sf-body .sf-nav-extra a:hover { color: var(--sf-primary); }
    .sf-nav-extra i { width: 20px; text-align: center; font-size: 16px; color: var(--sf-primary); }

    body.sf-menu-open { overflow: hidden; }
    body.sf-menu-open .sf-ai-fab { visibility: hidden; }
}

@media (max-width: 600px) {
    /* Top bar: one line — first selling point + phone (Help Center lives in the drawer) */
    .sf-topbar-inner { padding: 6px 12px; justify-content: center; flex-wrap: nowrap; gap: 16px; }
    .sf-topbar-left span:nth-child(n+2), .sf-topbar-right a:first-child { display: none; }

    /* Header: ☰ · logo · account / wishlist / cart icons, then search + vehicle full width */
    .sf-header-inner { padding: 8px 12px 12px; gap: 8px 4px; }
    .sf-logo { flex: 1 1 auto; min-width: 0; }
    .sf-logo img { height: 40px; max-width: 100%; object-fit: contain; object-position: left center; }
    .sf-header-actions { gap: 0; }
    .sf-header-actions > .sf-header-action { width: 44px; height: 44px; justify-content: center; }
    .sf-header-action > span:last-child { display: none; }
    .sf-header-search input { font-size: 16px; min-height: 44px; }
    /* Placeholder only: smaller (+ shorter wording via StorefrontMenuPage) so it fits;
       typed text stays 16px. The 34px right padding is only needed for the ✕ button. */
    .sf-header-search input::placeholder { font-size: 14px; }
    .sf-header-search-field:not(:has(.sf-header-search-clear)) input { padding-right: 12px; }
    .sf-vehicle-select, .sf-vehicle-go { height: 44px; font-size: 16px; }
    .sf-vehicle-vin-input { height: 40px; font-size: 16px; }
    .sf-vehicle-vin-decode { height: 40px; }

    /* AI floater: icon-only circle pinned inside the screen (incl. iPhone safe areas) */
    .sf-ai-fab {
        right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
        width: 56px; height: 56px; padding: 0; justify-content: center; font-size: 20px;
        border: 2px solid #fff;
    }
    .sf-ai-fab span { display: none; }
    .sf-ai-drawer { width: 100%; max-width: 100%; height: 100vh; height: 100dvh; }
    .sf-ai-composer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    .sf-ai-composer textarea { font-size: 16px; }

    /* Forms: one column, 48px controls, 16px text */
    .sf-co-grid { grid-template-columns: minmax(0, 1fr); }
    .sf-co-card { padding: 16px; }
    .sf-co-grid label { font-size: 14px; }
    .sf-co-grid label > p { margin: 0; }
    .sf-co-grid input, .sf-co-grid select, .sf-auth-label input, .sf-taxid-input, .sf-setpass input {
        min-height: 48px; font-size: 16px;
    }
    .sf-taxid-input { max-width: none; }
    .sf-setpass input { min-width: 0; flex-basis: 100%; }
    .sf-auth-card, .sf-auth-card-wide { padding: 20px 16px; }
    /* Sections nested inside the register card: drop the inner card chrome so the
       fields keep their width instead of losing 32px to double padding. */
    .sf-auth-card-wide .sf-co-card {
        padding: 16px 0 0; margin-bottom: 16px; border: none; border-top: 1px solid var(--sf-border); border-radius: 0;
    }
    .sf-auth-pass-field input { padding-right: 52px; }
    .sf-auth-pass-toggle { width: 44px; height: 44px; right: 2px; }
    .sf-radio-group { flex-direction: column; gap: 8px; }
    .sf-radio-option {
        min-height: 48px; padding: 0 14px; font-size: 16px;
        border: 1px solid var(--sf-border); border-radius: var(--sf-radius);
    }
    .sf-radio-option input { width: 20px; height: 20px; }
    .sf-co-billsame { min-height: 44px; font-size: 15px; }
    .sf-co-billsame input { width: 22px; height: 22px; }
    /* Order lookup / payment / RMA / license forms share .sf-license-field */
    .sf-license-field input, .sf-license-field select, .sf-license-field textarea { font-size: 16px; min-height: 48px; }
    .sf-license-field textarea { min-height: 96px; }

    /* Cart: VIN gate + quantity stepper */
    .sf-cart-vin { padding: 16px; gap: 14px; }
    .sf-vin-entry { max-width: none; }
    .sf-vin-inputrow { flex-direction: column; }
    .sf-vin-verify { width: 100%; }
    .sf-vin-check { padding: 6px 0; font-size: 15px; }
    .sf-vin-check input { width: 20px; height: 20px; }
    .sf-qty { min-height: 40px; }
    .sf-qty button { min-width: 40px; }
    .sf-qty-input { font-size: 16px; }

    /* Contact page: the support e-mail is one long word — let it wrap */
    .sf-body a.sf-contact-email { font-size: 18px; max-width: 100%; overflow-wrap: anywhere; }

    /* Footer: two link columns, roomier tap targets, clear of the AI floater */
    .sf-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding: 32px 16px 24px; }
    .sf-footer-col:first-child { grid-column: 1 / -1; }
    .sf-footer-col a { padding: 8px 0; }
    .sf-footer-base { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}

/* PDP on phones: the buy row (qty · Add to Cart · wishlist) is pinned to the bottom of
   the screen so it's always one tap away. Same element as desktop, so the existing
   StorefrontProductViewPage wiring (stock check, "✓ Added", wishlist) is unchanged. */
@media (max-width: 600px) {
    .sf-pdp .sf-pdp-actions {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: var(--sf-surface); border-top: 1px solid var(--sf-border);
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    }
    .sf-pdp .sf-pdp-actions .sf-qty { height: 48px; }
    .sf-pdp .sf-pdp-actions .sf-qty button { width: 44px; }
    .sf-pdp .sf-pdp-actions .sf-qty-input { width: 40px; font-size: 16px; font-weight: 600; }
    .sf-pdp .sf-pdp-actions .sf-btn-cart { min-height: 48px; padding: 0 12px; white-space: nowrap; }
    .sf-pdp .sf-pdp-actions .sf-wishlist-icon-btn-lg { flex: 0 0 48px; width: 48px; height: 48px; }
    /* Stock / quantity notices float just above the bar instead of growing it. */
    .sf-pdp .sf-pdp-actions .sf-qty-warn {
        position: absolute; left: 0; right: 0; bottom: 100%; margin: 0;
        padding: 6px 88px 6px 16px; background: #fff8e6; border-top: 1px solid #f0d78c; font-size: 13px;
    }
    /* Keep the AI floater above the bar, and the page end clear of both. */
    .sf-body:has(.sf-pdp-actions) .sf-ai-fab { bottom: calc(88px + env(safe-area-inset-bottom)); }
    .sf-body:has(.sf-pdp-actions) .sf-footer-base { padding-bottom: calc(164px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   Outlined text field with floating label (shared by every storefront form)
     <label class="sf-field">
       <input id="x" placeholder=" " />            ← control FIRST (sibling selectors)
       <span class="sf-field-label">Email <span class="sf-req-star">*</span></span>
       <small class="sf-field-hint">optional help text</small>
     </label>
   The label rests inside the box while the field is empty and unfocused, and floats onto
   the top border on focus or once it has a value. Only controls whose placeholder is a
   single space rest inside — a field with a real placeholder (State "CA") or a select /
   date keeps its label floated so the two never overlap. Set --sf-field-bg on a container
   whose background isn't white so the label's notch matches it.
   ============================================================ */
.sf-body .sf-field { position: relative; display: block; margin: 0; padding: 0; font-weight: 400; }
.sf-body .sf-field[hidden] { display: none; }
.sf-body .sf-field > input,
.sf-body .sf-field > select,
.sf-body .sf-field > textarea {
    display: block; width: 100%; min-width: 0; max-width: none; height: 48px; margin: 0; padding: 0 14px;
    background: var(--sf-surface); border: 1px solid #c4cad4; border-radius: var(--sf-radius);
    font-family: inherit; font-size: 15px; color: var(--sf-text); letter-spacing: normal; text-transform: none;
    outline: none; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.sf-body .sf-field > textarea { height: auto; min-height: 96px; padding: 14px; resize: vertical; }
.sf-body .sf-field > :is(input, select, textarea):hover { border-color: #8b95a5; }
.sf-body .sf-field > :is(input, select, textarea):focus { border-color: var(--sf-primary); box-shadow: 0 0 0 1px var(--sf-primary); }
.sf-body .sf-field > [readonly] { background: var(--sf-bg); color: var(--sf-text-muted); }
.sf-body .sf-field > input::placeholder { color: #9ca3af; }

.sf-body .sf-field-label {
    position: absolute; left: 10px; top: 0; transform: translateY(-50%);
    max-width: calc(100% - 20px); padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: var(--sf-field-bg, var(--sf-surface)); border-radius: 2px;
    font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--sf-text-muted);
    pointer-events: none; transition: top .15s ease, font-size .15s ease, color .15s ease;
}
.sf-body .sf-field > :is(input, select, textarea):focus ~ .sf-field-label { color: var(--sf-primary); }
/* Resting state: empty + unfocused → label sits inside the box like a placeholder */
.sf-body .sf-field > [placeholder=" "]:placeholder-shown:not(:focus) ~ .sf-field-label {
    top: 24px; font-size: 15px; font-weight: 400; color: #6b7280; background: transparent;
}
.sf-body .sf-field > textarea[placeholder=" "]:placeholder-shown:not(:focus) ~ .sf-field-label { top: 24px; }
.sf-body .sf-field-label .sf-req-star { color: var(--sf-primary); }
.sf-body .sf-field-hint { display: block; margin: 6px 2px 0; font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--sf-text-muted); }

/* Password field: room for the show/hide eye button on the right */
.sf-body .sf-field-pass > input { padding-right: 48px; }
.sf-body .sf-field-pass > .sf-auth-pass-toggle { top: 24px; right: 4px; width: 40px; height: 40px; }

/* Spacing for stacks/grids of fields — a floated label needs ~8px above the box */
.sf-co-grid { row-gap: 20px; }
.sf-field-stack { display: flex; flex-direction: column; gap: 20px; margin-bottom: 16px; }
.sf-license-form { gap: 20px; }
.sf-auth-regstart > .sf-field { margin-bottom: 12px; }
.sf-setpass { gap: 12px; }
.sf-setpass > .sf-field { flex: 1 1 240px; min-width: 0; }
.sf-setpass > .sf-btn { min-height: 48px; }
.sf-cart-taxid > .sf-field { max-width: 420px; }
.sf-cart-vin { --sf-field-bg: #fff8e6; }

@media (max-width: 600px) {
    .sf-body .sf-field > input, .sf-body .sf-field > select, .sf-body .sf-field > textarea { font-size: 16px; }
    .sf-body .sf-field > [placeholder=" "]:placeholder-shown:not(:focus) ~ .sf-field-label { font-size: 16px; }
}

/* ============================================================
   Cart + Wishlist on phones
   Compact line cards, real tap targets, suggestions as a swipe row instead of a
   1,100px-tall grid, and Total + Checkout pinned to the bottom (CartView.renderMobileBar)
   because the summary box sits below everything else on a phone.
   ============================================================ */
.sf-cart-mbar, .sf-cart-unit, .sf-cart-cell-mremove { display: none; } /* phone-only pieces */

@media (max-width: 600px) {
    .sf-cart-mbar {
        display: flex; align-items: center; gap: 12px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: var(--sf-surface); border-top: 1px solid var(--sf-border);
        box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    }
    .sf-cart-mbar-total { display: flex; flex-direction: column; line-height: 1.2; flex: 0 0 auto; }
    .sf-cart-mbar-total span { font-size: 12px; color: var(--sf-text-muted); }
    .sf-cart-mbar-total strong { font-size: 18px; color: var(--sf-navy); }
    .sf-cart-mbar .sf-btn-cart { flex: 1 1 auto; min-height: 48px; padding: 0 12px; white-space: nowrap; justify-content: center; }
    .sf-body:has(.sf-cart-mbar) .sf-ai-fab { bottom: calc(88px + env(safe-area-inset-bottom)); }
    .sf-body:has(.sf-cart-mbar) .sf-footer-base { padding-bottom: calc(164px + env(safe-area-inset-bottom)); }

    /* .sf-main already gives a 16px gutter; the page's own 20px (declared further up,
       after the earlier mobile blocks) doubled it to 36px. */
    .sf-catalog-page, .sf-cart-page { padding-left: 0; padding-right: 0; }

    /* Line cards (cart + wishlist share .sf-cart-row), laid out like the mobile design:
         [img]  Title (max 3 lines)
                SKU · OEM · $x each · In stock · Move to Wishlist
         [− 1 +]  [🗑]                       $line total      ← cart
         [− 1 +]              [Add to Cart] [🗑]             ← wishlist
       The Price column and the "Price / Quantity / Total" labels go: the unit price is
       the "$x each" line (.sf-cart-unit) inside the product info instead. */
    .sf-cart-row {
        grid-template-columns: auto auto minmax(0, 1fr);
        grid-template-areas: "prod prod prod" "qty act total";
        column-gap: 8px; row-gap: 12px; align-items: center; padding: 14px;
    }
    .sf-cart-cell-product { grid-area: prod; gap: 12px; }
    .sf-cart-img { width: 72px; height: 72px; flex-basis: 72px; }
    .sf-cart-info { min-width: 0; }
    .sf-cart-name {
        font-size: 14px; line-height: 1.35; margin-bottom: 4px;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    }
    .sf-cart-attr { font-size: 12px; }
    .sf-cart-unit { display: block; margin-top: 2px; font-size: 13px; color: var(--sf-text-muted); }
    .sf-cart-row .sf-cart-cell-price { display: none; }
    .sf-cart-row .sf-cart-cell-qty { grid-area: qty; display: block; min-height: 0; }
    .sf-cart-row .sf-cart-cell-total { grid-area: total; justify-content: flex-end; font-size: 16px; }
    .sf-cart-row .sf-cart-cell-qty::before, .sf-cart-row .sf-cart-cell-total::before { content: none; }
    .sf-cart-row .sf-qty { height: 44px; }
    .sf-cart-qty-warn { text-align: left; }

    /* Cart: trash icon beside the stepper replaces the text "Remove" under the title;
       "Move to Wishlist" stays there. */
    .sf-cart-cell-mremove { display: block; grid-area: act; }
    .sf-cart-remove-icon {
        display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
        border: none; border-radius: var(--sf-radius); background: none; color: var(--sf-text-muted); font-size: 20px;
    }
    .sf-cart-remove-icon:hover { color: var(--sf-danger); background: var(--sf-bg); }
    .sf-cart-line-actions .sf-cart-remove { display: none; }
    .sf-cart-line-actions { margin-top: 2px; }
    .sf-cart-line-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0; font-size: 13px; }

    /* Wishlist: same card, bottom row = stepper | Add to Cart + trash on the right */
    .sf-wishlist-table { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); overflow: hidden; }
    .sf-wishlist-table .sf-cart-row:first-of-type { border-top: none; }
    .sf-wishlist-row.sf-cart-row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "prod prod" "qty act"; padding: 14px; }
    .sf-wishlist-actions-cell { grid-area: act; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 4px; }
    .sf-wishlist-actions-cell .sf-btn { flex: 0 1 auto; min-height: 40px; padding: 0 14px; white-space: nowrap; }
    .sf-wishlist-actions-cell .sf-cart-remove {
        display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; font-size: 20px;
        text-decoration: none;
    }
    .sf-wishlist-actions-cell .sf-cart-remove-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

    /* Phone order: cart lines → Continue/Update/Save → summary ("Proceed to Checkout") →
       assurance → suggestions, instead of the summary last. Flatten .sf-cart-main so its
       children and the <aside> become siblings in one column, then order them. */
    /* stretch: the desktop grid's align-items:start otherwise shrink-wraps each block to its
       content (the summary came out narrower than the rest once "free shipping" was met) */
    .sf-cart-layout { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
    .sf-cart-main { display: contents; }
    .sf-cart-table { order: 1; }
    .sf-cart-actions { order: 2; } /* Continue / Update / Save sit right above the checkout summary */
    /* static: the desktop rule (position: sticky; top: 90px) is declared after the old
       960px "static" override, so once the summary sat mid-page it stuck while scrolling
       and covered the buttons / suggestions below it */
    .sf-cart-summary { order: 3; position: static; }
    .sf-cart-assurance { order: 4; }
    .sf-cart-suggest { order: 5; margin-top: 0; }
    /* as flex items these would otherwise grow to the swipe row's full scroll width */
    .sf-cart-table, .sf-cart-summary, .sf-cart-actions, .sf-cart-assurance, .sf-cart-suggest { min-width: 0; max-width: 100%; }

    /* Continue / Update / Save — one row of three compact icon-over-label buttons */
    .sf-cart-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
    .sf-cart-actions .sf-btn {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        width: 100%; min-height: 56px; padding: 6px 4px; font-size: 12px; line-height: 1.2; white-space: normal; text-align: center;
    }
    .sf-cart-actions .sf-btn i { font-size: 16px; }
    .sf-cart-assurance { grid-template-columns: 1fr; gap: 12px; }

    /* "You May Also Need": horizontal swipe row */
    .sf-suggest-grid {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%;
        overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
        margin: 0 -16px; padding: 0 16px 8px; scroll-padding: 0 16px; gap: 12px;
    }
    .sf-suggest-card { scroll-snap-align: start; }
    .sf-suggest-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .sf-suggest-add { min-height: 40px; }
}

/* ============================================================
   My Account on phones: same order as desktop (orders, then the shortcut tiles), with
   the history capped to 5 rows (see .sf-account-orders.is-collapsed), tiles as a
   compact 2-up grid, and Pay now / Track tucked to the right of each order.
   ============================================================ */
@media (max-width: 600px) {
    .sf-account-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
    .sf-account-page > .sf-account-section { padding: 16px; }
    .sf-account-tile { padding: 14px; gap: 2px; }
    .sf-account-tile i { font-size: 20px; margin-bottom: 4px; }
    .sf-account-tile-t { font-size: 14px; }
    .sf-account-tile-d { font-size: 12px; }

    /* Order card: number / date / status down the left, total + compact buttons on the right
         SAST2609090002      $1,045.24
         Sep 9, 2026      [Pay now][Track]
         (Pending Payment)                  */
    .sf-ao-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "num total" "date actions" "status actions";
        column-gap: 12px; row-gap: 4px; align-items: center; padding: 12px 0;
    }
    .sf-ao-num { grid-area: num; }
    .sf-ao-date { grid-area: date; font-size: 12.5px; }
    .sf-ao-status { grid-area: status; }
    .sf-ao-total { grid-area: total; text-align: right; }
    .sf-ao-actions { grid-area: actions; align-self: end; justify-content: flex-end; gap: 6px; }
    .sf-ao-actions .sf-btn-mini { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; font-size: 12px; }
    .sf-ao-more { width: 100%; }
}

/* Order history starts collapsed: newest 10 on desktop (a compact table), newest 5 on
   phones (tall cards). Child 1 is the .sf-ao-head row, so order N is child N+1.
   StorefrontAccountViewPage removes .is-collapsed when "Show all orders" is pressed. */
.sf-account-orders.is-collapsed > .sf-ao-row:nth-child(n+12) { display: none; }
.sf-ao-more { display: block; min-width: 220px; min-height: 44px; margin: 16px auto 0; }
@media (min-width: 601px) {
    .sf-ao-more[data-desktop-fits="1"] { display: none; }
}
@media (max-width: 600px) {
    .sf-account-orders.is-collapsed > .sf-ao-row:nth-child(n+7) { display: none; }
}

/* ============================================================
   Product lists on phones (catalog results + Home "Featured Products")
   One horizontal card per row, as in the mobile design:
     [96px image]  Title (2 lines)
                   Brand · Category
                   $price  In Stock           [♡] [Add to Cart]
   instead of a 2-up grid of tall, cramped cards. Catalog uses .sf-card,
   Home uses .sf-featured-card — same layout for both.
   ============================================================ */
@media (max-width: 600px) {
    .sf-home { padding-left: 0; padding-right: 0; } /* .sf-main already gives 16px */

    .sf-catalog-grid, .sf-featured-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .sf-card, .sf-featured-card {
        display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; align-items: stretch;
        padding: 12px; position: relative;
    }
    .sf-card:hover, .sf-featured-card:hover { transform: none; }

    .sf-card-image, .sf-featured-img {
        width: 96px; height: 96px; aspect-ratio: auto; padding: 4px;
        background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius);
    }
    .sf-kit-badge, .sf-fits-badge { padding: 2px 5px; font-size: 9px; }
    .sf-kit-badge { top: 4px; left: 4px; }
    .sf-fits-badge { top: auto; right: auto; bottom: 4px; left: 4px; }

    .sf-card-body, .sf-featured-body { min-width: 0; padding: 0; gap: 2px; }
    .sf-card-body .sf-card-heading, .sf-featured-title {
        margin: 0; font-size: 14px; line-height: 1.35; -webkit-line-clamp: 2;
    }
    .sf-card .sf-pills, .sf-card-desc, .sf-featured-card .sf-pills { display: none; }
    .sf-card-meta { margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Bottom row: price + stock on the left, wishlist + add on the right */
    .sf-card .sf-card-bottom, .sf-featured-card .sf-card-bottom {
        flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px;
    }
    .sf-card-price-row, .sf-featured-pricerow { flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; }
    .sf-card-price, .sf-featured-price { font-size: 17px; line-height: 1.2; }
    .sf-card-stock, .sf-featured-stock { font-size: 11.5px; }
    .sf-card .sf-card-actions, .sf-featured-card .sf-card-actions { flex: 0 0 auto; gap: 6px; }
    .sf-card-actions .sf-card-add, .sf-card-actions .sf-featured-add {
        flex: 0 0 auto; width: auto; height: 40px; min-height: 40px; margin: 0; padding: 0 12px;
        font-size: 13px; white-space: nowrap;
    }
    /* The bottom row is only ~210px wide — not enough for price + Add to Cart + ♡ once a
       price runs to "$1,045.24" — so the wishlist heart floats on the image's top-right
       corner instead (card padding 12px + image 96px). */
    .sf-card .sf-wishlist-icon-btn, .sf-featured-card .sf-wishlist-icon-btn {
        position: absolute; top: 16px; left: 72px; z-index: 1;
        flex: none; width: 32px; height: 32px; border-radius: 50%;
        background: rgba(255,255,255,0.92); box-shadow: 0 1px 3px rgba(0,0,0,0.15); font-size: 14px;
    }
}

/* ============================================================
   Payment / Track (Order Lookup) / Return (RMA) on phones — Modules/Public/*
   The parts table (8 columns, ~855px) becomes one card per part:
       Part name                                   [🗑] or [☐] on the left (return picker)
       SKU: …   OEM: …
       Price ………………………… $x      Qty ………… [− 1 +]      Total ………… $y
   Cells carry data-label (PublicOrder.renderPartsCard / LookupOrderPage.renderPickParts).
   ============================================================ */
@media (max-width: 600px) {
    .sf-pay-header-inner { padding: 14px 16px; }
    .sf-pay-shell { padding: 16px 16px 48px; }
    .sf-pay-mark { height: 40px; }
    .sf-pay-heading h1 { font-size: 20px; overflow-wrap: anywhere; }
    .sf-pay-card-head { padding: 14px 16px; }
    .sf-pay-info-grid, .sf-pay-form-body, .sf-pay-summary-body { padding: 16px; }
    .sf-pay-btn-pay, .sf-pay-btn-close { min-height: 48px; }
    .sf-pay-iframe-card .sf-iframe-container { margin: 0 16px; }
    .sf-pay-iframe-note { padding: 0 16px; }

    /* Parts table → cards */
    .sf-pay-table-wrap { overflow: visible; }
    .sf-pay-table thead { display: none; }
    .sf-pay-table, .sf-pay-table tbody, .sf-pay-table td { display: block; width: 100%; }
    .sf-pay-table tbody tr { display: flex; flex-direction: column; gap: 2px; position: relative; padding: 12px 16px; }
    .sf-pay-table td { padding: 0; text-align: left; }
    .sf-pay-table td.sf-pay-td-name { order: -1; margin-bottom: 2px; font-size: 15px; font-weight: 600; color: var(--sf-text); }
    .sf-pay-table td.sf-pay-td-sku, .sf-pay-table td.sf-pay-td-oem { font-size: 13px; font-weight: 400; color: var(--sf-text-muted); }
    .sf-pay-table td.sf-pay-td-sku::before, .sf-pay-table td.sf-pay-td-oem::before { content: attr(data-label) ": "; }
    .sf-pay-table td.sf-pay-right[data-label] { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
    .sf-pay-table td.sf-pay-right[data-label]::before { content: attr(data-label); font-size: 13px; font-weight: 400; color: var(--sf-text-muted); }
    .sf-pay-table td.sf-pay-right[data-label]:nth-last-child(1 of [data-label]) { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--sf-border); }
    .sf-pay-table .sf-qty-warn { text-align: right; }
    .sf-pay-table td.sf-pay-empty-row { text-align: center; padding: 20px 0; }

    /* Remove (payment page) — top-right corner of the card */
    .sf-pay-table td.sf-pay-td-remove { position: absolute; top: 6px; right: 8px; width: auto; }
    .sf-pay-table tr:has(.sf-pay-td-remove) .sf-pay-td-name { padding-right: 44px; }
    .sf-pay-remove-btn { width: 40px; height: 40px; }

    /* Select-to-return checkbox — left gutter of the card */
    .sf-pay-table td.sf-pay-select-cell { position: absolute; top: 12px; left: 16px; width: auto; }
    .sf-pay-table tr:has(.sf-pay-select-cell) { padding-left: 52px; }
    .sf-pay-select-cell input { width: 22px; height: 22px; margin: 0; accent-color: var(--sf-primary); }

    .sf-pay-back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 4px; font-size: 14px; }
    .sf-pay-actions-row { padding: 16px; }
    .sf-pay-actions-row .sf-btn { flex: 1 1 auto; min-height: 48px; justify-content: center; }

    /* Eligibility questions + "delivered to" radios: stacked, big tap targets */
    .sf-pay-question-row { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
    /* Fixed 2-up grid (not wrapping flex / auto-fill): those got sized as if each option
       sat on its own line, leaving Yes/No 96px tall. More options just wrap in pairs. */
    .sf-pay-question-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .sf-pay-radio-inline { flex-direction: column; gap: 8px; }
    .sf-pay-question-options label, .sf-pay-radio-inline label {
        min-height: 44px; padding: 0 14px; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); font-size: 15px;
    }
    .sf-pay-question-options input, .sf-pay-radio-inline input { width: 20px; height: 20px; margin: 0; accent-color: var(--sf-primary); }
}

/* ============================================================
   Checkout summary: loading / updating / error states
   (StorefrontCheckoutViewPage.renderSummaryBusy / renderSummary). The Quote call
   live-checks supplier stock, so it can take a few seconds.
   ============================================================ */
.sf-spinner {
    display: inline-block; flex: none; width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--sf-border); border-top-color: var(--sf-primary);
    animation: sf-spin .8s linear infinite;
}
.sf-spinner-sm { width: 14px; height: 14px; }
@keyframes sf-spin { to { transform: rotate(360deg); } }

.sf-summary-loading { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0 8px; }
.sf-summary-loading .sf-spinner { margin-top: 2px; }
.sf-summary-loading strong { display: block; font-size: 14px; color: var(--sf-navy); }
.sf-summary-loading span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--sf-text-muted); }

.sf-skel {
    border-radius: 6px; margin-top: 12px;
    background: linear-gradient(90deg, #eef1f5 25%, #f7f8fa 50%, #eef1f5 75%); background-size: 200% 100%;
    animation: sf-shimmer 1.3s ease-in-out infinite;
}
.sf-skel-line { height: 12px; }
.sf-skel-short { width: 60%; }
.sf-skel-btn { height: 44px; margin-top: 18px; }
@keyframes sf-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Re-quote: the last summary stays readable but dimmed and inert until the new one lands */
.sf-checkout-summary.is-busy > :not(.sf-summary-busy) { opacity: .45; pointer-events: none; transition: opacity .15s; }
.sf-summary-busy { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--sf-navy); }

.sf-summary-error {
    display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; padding: 12px;
    background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--sf-radius); color: #991b1b;
}
.sf-summary-error i { margin-top: 2px; }
.sf-summary-error strong { display: block; font-size: 14px; }
.sf-summary-error span { display: block; margin-top: 2px; font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) {
    .sf-spinner { animation-duration: 2.4s; }
    .sf-skel { animation: none; }
}

/* ============================================================
   Toast (Modules/Storefront/Toast/StorefrontToast.ts) — in-page replacement for alert()
   ============================================================ */
.sf-toast {
    position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 300;
    display: flex; align-items: center; gap: 10px;
    width: max-content; max-width: min(480px, calc(100vw - 32px));
    padding: 12px 8px 12px 16px; border-radius: var(--sf-radius-lg);
    background: var(--sf-navy); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    font-size: 14px; line-height: 1.4;
    opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease;
}
.sf-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.sf-toast > i { flex: none; font-size: 18px; }
.sf-toast-success > i { color: #4ade80; }
.sf-toast-info > i { color: #93c5fd; }
.sf-toast-error > i { color: #fca5a5; }
.sf-toast-msg { flex: 1 1 auto; min-width: 0; }
.sf-toast-close {
    flex: none; width: 32px; height: 32px; border: none; border-radius: var(--sf-radius);
    background: transparent; color: #cbd5e1; font-size: 20px; line-height: 1; cursor: pointer;
}
.sf-toast-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
/* Phones: sit above the pinned Total + Checkout bar on the cart */
@media (max-width: 600px) {
    .sf-body:has(.sf-cart-mbar) .sf-toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .sf-toast { transition: none; } }

/* RMA form: Back + Submit RMA side by side at the end of the form (after the eligibility
   questions and the error line) — LookupOrderPage.renderRmaForm. */
.sf-rma-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.sf-rma-actions .sf-btn { width: auto; min-width: 140px; min-height: 48px; margin: 0; justify-content: center; }
.sf-rma-actions #sf-rma-submit { min-width: 220px; }
/* the info grid sits inside .sf-pay-form-body, which already pads it — don't pad twice */
.sf-pay-form-body > .sf-pay-info-grid { padding: 0; }
@media (max-width: 600px) {
    /* equal halves: Back | Submit RMA */
    .sf-rma-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sf-rma-actions .sf-btn, .sf-rma-actions #sf-rma-submit { min-width: 0; width: 100%; }
}

/* ============================================================
   Content pages on phones (Shipping / Returns / Warranty / Terms / FAQ)
   .sf-main (16px) + .sf-content-page (20px) + .sf-content-article (36px) stacked
   three gutters — the text column was ~229px wide on a 375px phone.
   ============================================================ */
@media (max-width: 600px) {
    .sf-content-page { padding-left: 0; padding-right: 0; }
    .sf-content-article { padding: 20px 16px; }
    .sf-featured-all { display: inline-flex; align-items: center; min-height: 44px; } /* Home "View all →" */
}

/* ============================================================
   Header row order + pinned header bar on phones
   Markup: .sf-header-inner > .sf-header-bar (☰, logo, .sf-header-actions) + .sf-header-center
   (vehicle + search). The bar is display:contents above 600px, so desktop still reads
   logo | search | actions (ordered below) and tablet wraps the search onto its own row.
   ============================================================ */
.sf-header-bar { display: contents; }
.sf-header-search-jump { display: none; }
@media (min-width: 901px) {
    .sf-header-center { order: 1; }
    .sf-header-actions { order: 2; }
}
@media (max-width: 900px) {
    .sf-header-actions { margin-left: auto; } /* tablet: ☰ logo …… icons, search on its own row */
}

/* Phones: only the ~61px bar sticks; the vehicle + search rows scroll away (the whole
   header was ~230px — a quarter of the screen). The header and its inner row are
   flattened so the bar's sticky range is the whole page, not just the header box. */
@media (max-width: 600px) {
    :root { --sf-bar-h: 61px; }
    .sf-header, .sf-header-inner { display: contents; }
    .sf-header-bar {
        display: flex; align-items: center; gap: 4px;
        position: sticky; top: 0; z-index: 100;
        height: var(--sf-bar-h); padding: 8px 12px; box-sizing: border-box;
        background: var(--sf-surface); border-bottom: 1px solid var(--sf-border); box-shadow: var(--sf-shadow-sm);
    }
    .sf-header-bar .sf-logo { flex: 1 1 auto; min-width: 0; }
    .sf-header-center {
        display: flex; flex-direction: column; gap: 8px;
        padding: 12px; background: var(--sf-surface); border-bottom: 1px solid var(--sf-border);
    }
    /* the drawer lost the header's stacking context — keep it above the sticky bars and the AI button */
    .sf-nav { z-index: 240; }
    .sf-nav-overlay { z-index: 239; }
    /* Catalog's sticky Categories toolbar sits right under the pinned bar */
    .sf-catalog-toolbar { top: var(--sf-bar-h); }

    .sf-header-search-jump { border: none; background: none; color: var(--sf-navy); font-size: 18px; cursor: pointer; }
    body.sf-search-offscreen .sf-header-search-jump { display: inline-flex; align-items: center; }
}
