/* ============================================================
   PIXCORE - Shared base styles + storefront
   Theme variables come from css/theme.php (white-label engine)
   ============================================================ */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
    font-family:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:var(--light); color:var(--text);
    font-size:15px; line-height:1.55; -webkit-font-smoothing:antialiased;
}
img { max-width:100%; display:block; }
a { color:var(--primary); text-decoration:none; }
a:hover { color:var(--primary-hover); }
h1,h2,h3,h4 { color:var(--heading); font-weight:700; line-height:1.25; }

/* ★ v7.113 — `.muted` FINALLY EXISTS ON THE STOREFRONT. Every CMS section on the
   home page (includes/render_page.php), the blog, the product page, the cart and
   the account page print `class="muted"`, but only css/admin.css ever defined
   it — so on the live site the class did nothing and each of those lines
   rendered in the full body colour instead of as secondary text. `--gray` is
   the token for secondary text in BOTH palettes (it is #94a3b8 on the light
   page and #B0B0B0 on graphite), which is exactly what the class was meant to
   mean. The admin suite is unaffected: it loads after this file and its own
   `.muted` rule also sets a font size. */
.muted { color:var(--gray); }

/* ---------- Buttons ---------- */
.btn {
    display:inline-flex; align-items:center; gap:8px; justify-content:center;
    padding:10px 18px; border-radius:var(--radius); border:none;
    font:inherit; font-weight:600; font-size:0.92rem; cursor:pointer;
    transition:var(--transition); white-space:nowrap;
}
.btn-primary { background:var(--primary); color:var(--white); }
.btn-primary:hover { background:var(--primary-hover); transform:translateY(-1px); box-shadow:var(--shadow); }
.btn-outline { background:transparent; color:var(--primary); border:2px solid var(--primary); }
.btn-outline:hover { background:var(--primary); color:var(--white); }
.btn-danger { background:var(--danger); color:var(--white); }
.btn-danger:hover { filter:brightness(0.9); }
.btn-success { background:var(--success); color:var(--white); }
.btn-ghost { background:color-mix(in srgb, var(--dark) 6%, transparent); color:var(--text); }
.btn-ghost:hover { background:color-mix(in srgb, var(--dark) 12%, transparent); }
.btn-sm { padding:6px 12px; font-size:0.82rem; border-radius:8px; }
.btn-lg { padding:14px 28px; font-size:1rem; }
.btn-block { width:100%; }
.btn:disabled { opacity:.5; cursor:not-allowed; transform:none!important; }

/* ---------- Forms ---------- */
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-weight:600; font-size:0.85rem; margin-bottom:6px; color:var(--heading); }
.form-control, input[type=text], input[type=number], input[type=email], input[type=password],
input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
    width:100%; padding:11px 14px; border:2px solid var(--border); border-radius:var(--radius);
    font:inherit; font-size:0.92rem; background:var(--surface); color:var(--text);
    transition:border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    outline:none; border-color:var(--primary); box-shadow:0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}
textarea.form-control, textarea { min-height:90px; resize:vertical; font:inherit; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-row-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.checkbox-row { display:flex; align-items:center; gap:10px; }
.checkbox-row input[type=checkbox] { width:20px; height:20px; accent-color:var(--primary); }
.field-hint { font-size:0.78rem; color:var(--gray); margin-top:4px; }

/* ---------- Cards / tables / badges ---------- */
.card { background:var(--surface); border-radius:var(--radius-lg); box-shadow:var(--shadow); padding:26px; }
.card h3 { margin-bottom:16px; font-size:1.05rem; }
.section-gap { margin-top:24px; }
.table-wrap { overflow-x:auto; border-radius:var(--radius-lg); background:var(--surface); box-shadow:var(--shadow); }
table.data-table { width:100%; border-collapse:collapse; min-width:640px; }
.data-table thead th {
    text-align:left; padding:14px 16px; font-size:0.75rem; letter-spacing:.08em;
    text-transform:uppercase; color:var(--gray); border-bottom:2px solid var(--border); background:var(--surface-2);
}
.data-table tbody td { padding:13px 16px; border-bottom:1px solid var(--border); vertical-align:middle; }
.data-table tbody tr:hover { background:var(--primary-soft); }
.data-table tbody tr:last-child td { border-bottom:none; }
.table-empty { text-align:center; padding:48px 20px!important; color:var(--gray); }
.badge { display:inline-flex; align-items:center; gap:5px; padding:4px 11px; border-radius:999px; font-size:0.74rem; font-weight:700; }
.badge-success { background:color-mix(in srgb, var(--success) 14%, transparent); color:var(--success-ink); }
.badge-warning { background:color-mix(in srgb, var(--warning) 16%, transparent); color:var(--warning-ink); }
.badge-danger  { background:color-mix(in srgb, var(--danger) 14%, transparent);  color:var(--danger-ink); }
.badge-info    { background:color-mix(in srgb, var(--info) 14%, transparent);    color:var(--info-ink); }
.badge-gray    { background:color-mix(in srgb, var(--gray) 18%, transparent);   color:var(--text); }
.badge-primary { background:var(--primary-soft); color:var(--primary-ink); }
/* v7.11 — collected (handover) state, same tint formula as its siblings */
.badge-purple  { background:color-mix(in srgb, var(--purple) 14%, transparent); color:var(--purple-ink); }

/* ---------- Toast notifications ---------- */
.toast-stack { position:fixed; top:22px; right:22px; z-index:9999; display:flex; flex-direction:column; gap:10px; }
.toast {
    min-width:280px; max-width:380px; padding:14px 18px; border-radius:12px; color:var(--white);
    font-weight:600; font-size:0.9rem; box-shadow:var(--shadow-lg);
    animation:toastIn .3s ease; display:flex; align-items:center; gap:10px;
}
.toast.success { background:var(--success); } .toast.error { background:var(--danger); }
.toast.info { background:var(--info); }
@keyframes toastIn { from { opacity:0; transform:translateX(40px);} to { opacity:1; transform:none;} }

/* ---------- Modal ---------- */
.modal-overlay {
    position:fixed; inset:0; background:color-mix(in srgb, var(--dark) 55%, transparent); z-index:9000;
    display:flex; align-items:center; justify-content:center; padding:20px; backdrop-filter:blur(3px);
}
.modal-box {
    background:var(--surface); border-radius:var(--radius-lg); width:min(680px,100%);
    max-height:88vh; display:flex; flex-direction:column; animation:modalIn .25s ease; box-shadow:var(--shadow-lg);
}
.modal-box.modal-wide { width:min(960px,100%); }
@keyframes modalIn { from { opacity:0; transform:scale(.96) translateY(12px);} to { opacity:1; transform:none;} }
.modal-head { display:flex; justify-content:space-between; align-items:center; padding:18px 24px; border-bottom:1px solid var(--border); }
.modal-head h3 { font-size:1.02rem; }
.modal-close { background:none; border:none; font-size:1.6rem; cursor:pointer; color:var(--gray); line-height:1; }
.modal-body { padding:24px; overflow-y:auto; }
.modal-foot { padding:16px 24px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:10px; }

/* ---------- Storefront ---------- */
.sf-topbar { background:var(--dark); color:color-mix(in srgb, var(--white) 78%, transparent); font-size:0.84rem; padding:8px 0; }
.sf-topbar-inner { max-width:1200px; margin:0 auto; padding:0 24px; display:flex; justify-content:space-evenly; gap:16px; flex-wrap:wrap; }
.sf-topbar-right { display:flex; align-items:center; gap:14px; }
a.sf-staff-login { color:color-mix(in srgb, var(--white) 68%, transparent); font-weight:500; font-size:0.82rem; text-decoration:none; }
a.sf-staff-login:hover { color:var(--white); }
.sf-header { background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:500; }
.sf-header-inner { max-width:1200px; margin:0 auto; padding:16px 24px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.sf-brand { display:flex; align-items:center; gap:12px; }
.sf-brand img { height:46px; width:auto; }
.sf-brand-name { font-weight:800; font-size:1.15rem; color:var(--heading); letter-spacing:-.01em; }
.sf-nav a { margin-left:22px; font-weight:600; font-size:0.92rem; color:var(--text); position:relative; }
.sf-nav a:hover { color:var(--primary-hover); }
.sf-nav a.sf-on { color:var(--primary-hover); }
.sf-nav a.sf-on::after { content:''; position:absolute; left:22px; right:0; bottom:-7px; height:3px; border-radius:99px; background:var(--primary); }

/* ---------- Visitor 🌞/🌙 theme switch ---------- */
.wl-theme-toggle {
    width:38px; height:38px; border-radius:50%; border:1px solid var(--border);
    background:var(--surface); color:var(--heading); cursor:pointer; flex:0 0 auto;
    display:inline-flex; align-items:center; justify-content:center;
    font-size:0.95rem; transition:var(--transition); margin-left:14px;
}
.wl-theme-toggle:hover { color:var(--primary); border-color:var(--primary); transform:rotate(15deg); }
.sf-hero { background: radial-gradient(1100px 520px at 85% -12%, color-mix(in srgb, var(--primary) 34%, transparent), transparent 62%),
                     radial-gradient(900px 460px at 8% 115%, color-mix(in srgb, var(--secondary) 22%, transparent), transparent 60%),
                     linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%); color:var(--white); padding:96px 24px; text-align:center; }
.sf-hero h1 { color:var(--white); font-size:clamp(2rem,5vw,3.2rem); letter-spacing:-.03em; margin-bottom:14px; }
.sf-hero p { color:var(--gray); font-size:1.08rem; max-width:640px; margin:0 auto 30px; }
.sf-section { max-width:1200px; margin:0 auto; padding:64px 24px; }
.sf-section-title { text-align:center; margin-bottom:40px; }
.sf-section-title::after { content:''; display:block; width:56px; height:4px; border-radius:99px; background:linear-gradient(90deg, var(--primary), var(--secondary)); margin:16px auto 0; }
.sf-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:22px; }
.product-card {
    background:var(--surface); border-radius:var(--radius-lg); overflow:hidden;
    box-shadow:var(--shadow); border:1px solid var(--border); transition:var(--transition); display:flex; flex-direction:column;
}
.product-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); border-color:color-mix(in srgb, var(--primary) 35%, transparent); }
/* ★ v7.19 — `contain`, not `cover`. The file on disk already holds the WHOLE
   uploaded photo (ImageHandler only ever downscales — it never crops), so these
   three lines were the one thing slicing the sides off every product/blog card:
   a wide photo in a 4:3 frame lost its left and right edges, a tall one lost top
   and bottom. The frame and its light background stay exactly as they were, so
   the grid still lines up — the picture simply fits inside it, complete. */
.product-card-img { aspect-ratio:4/3; background:var(--light); display:flex; align-items:center; justify-content:center; color:var(--gray); font-size:2rem; overflow:hidden; }
.product-card-img img { width:100%; height:100%; object-fit:contain; }
/* The hover zoom went with `cover`: scaling a contained image would clip the very
   edges this change exists to show. The card's own lift remains the hover cue. */
.product-card-body { padding:18px; flex:1; display:flex; flex-direction:column; gap:8px; }
.product-card-body h4 { font-size:0.98rem; }
.product-card-desc { font-size:0.83rem; color:var(--gray); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.product-price { font-weight:800; color:var(--primary); font-size:1.08rem; margin-top:auto; }
/* v7.15 — the price qualifier (" /month", " once-off") plus the one-line
   period/VAT disclosure printed under a price grid or a single product. */
.price-qualifier { font-size:0.78em; font-weight:600; opacity:.72; margin-left:3px; letter-spacing:.01em; }
.price-note { text-align:center; margin:16px auto 0; max-width:760px; font-size:0.86rem; line-height:1.5; opacity:.85; }
.sf-footer { background:var(--dark); color:var(--gray); padding:44px 24px; margin-top:60px; }
.sf-footer-inner { max-width:1200px; margin:0 auto; display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; font-size:0.88rem; }
.sf-empty { text-align:center; color:var(--gray); padding:60px 20px; grid-column:1/-1; }

/* ---------- Slim page band (v3.1 — shop / inner page headers) ---------- */
.sf-pageband {
    background: radial-gradient(1100px 520px at 85% -12%, color-mix(in srgb, var(--primary) 34%, transparent), transparent 62%),
                linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    color:var(--white); padding:46px 24px; text-align:center;
}
.sf-pageband h1 { color:var(--white); font-size:clamp(1.7rem,3.6vw,2.4rem); letter-spacing:-.02em; margin-bottom:8px; }
.sf-pageband p { color:var(--gray); max-width:640px; margin:0 auto; font-size:1rem; }

/* ---------- ★ v7.126 — shop departments (the buttons under the shop / store heading) ----------
   THE LAYOUT RULE IS THE WRAP, nothing else: the row is centred and lets its chips flow, so one
   chip sits in the middle, two sit either side of it, a third wraps to a centred line of its own,
   four make 2 + 2, and so on for any count — on any screen width. */
.sf-deptbar { display:flex; flex-wrap:wrap; justify-content:center; align-items:center;
    gap:10px; margin:22px auto 0; max-width:820px; }
.sf-deptchip { display:inline-flex; align-items:center; gap:8px; padding:10px 18px; border-radius:999px;
    border:1px solid color-mix(in srgb, var(--white) 26%, transparent);
    background:color-mix(in srgb, var(--white) 9%, transparent);
    color:var(--white); text-decoration:none; font-weight:700; font-size:.88rem;
    letter-spacing:.02em; transition:var(--transition); }
.sf-deptchip:hover { border-color:var(--primary);
    background:color-mix(in srgb, var(--primary) 26%, transparent); }
.sf-deptchip.on { background:var(--primary); border-color:var(--primary); color:var(--white); }
.sf-deptcount { font-size:.72rem; font-weight:700; opacity:.7; }
.sf-deptchip.on .sf-deptcount { opacity:.85; }
.sf-deptback { display:inline-flex; align-items:center; gap:7px; margin-bottom:10px;
    color:var(--gray); text-decoration:none; font-size:.82rem; font-weight:600; }
.sf-deptback:hover { color:var(--white); }
@media (max-width:600px) { .sf-deptbar { gap:8px; margin-top:18px; }
    .sf-deptchip { padding:9px 14px; font-size:.82rem; } }


/* ---------- v6.2 Mobile header: burger + slide-down nav panel ---------- */
.sf-burger {
    display:none; width:44px; height:40px; flex-shrink:0;
    align-items:center; justify-content:center; cursor:pointer;
    background:color-mix(in srgb, var(--dark) 6%, transparent);
    border:1px solid var(--border); border-radius:10px;
    color:var(--heading); font-size:1.05rem; transition:var(--transition);
}
.sf-burger:hover { border-color:var(--primary); color:var(--primary); }

@media (max-width:768px) {
    .form-row, .form-row-3 { grid-template-columns:1fr; }

    /* Topbar: tighter on phones, address hidden (phone + email remain) */
    .sf-topbar { font-size:0.76rem; }
    .sf-topbar-inner { padding:0 14px; gap:8px 14px; }
    .sf-topbar-inner > span:nth-last-child(2) { display:none; }

    /* Brand row stays horizontal: logo left, burger right */
    .sf-header-inner { flex-direction:row; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; }
    .sf-brand { min-width:0; }
    .sf-brand img { height:38px; max-width:56vw; object-fit:contain; }
    .sf-brand-name { font-size:1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .sf-burger { display:inline-flex; }

    /* Nav becomes a slide-down panel anchored under the sticky header */
    .sf-nav {
        display:none; position:absolute; left:0; right:0; top:100%;
        flex-direction:column; gap:2px; margin:0;
        background:var(--surface); border-bottom:1px solid var(--border);
        box-shadow:var(--shadow-lg); padding:10px 14px 14px;
        max-height:calc(100vh - 120px); overflow-y:auto;
    }
    .sf-header.nav-open .sf-nav { display:flex; }
    .sf-nav a {
        margin:0; padding:12px; border-radius:10px;
        font-weight:600; font-size:0.95rem;
        display:flex; align-items:center; gap:10px;
    }
    .sf-nav a:hover { background:color-mix(in srgb, var(--dark) 5%, transparent); }
    .sf-nav a.sf-on { color:var(--primary); background:color-mix(in srgb, var(--primary) 8%, transparent); }
    .sf-nav .sf-cart-btn { margin:10px 0 0 !important; justify-content:center; }
}

/* ---------- v6.2 Featured/product grids: 2-up on phones ---------- */
@media (max-width:640px) {
    .sf-grid { grid-template-columns:repeat(2, minmax(0,1fr)) !important; gap:12px !important; }
    .sf-section-title { margin-bottom:22px; }
    .sf-section-title h1, .sf-section-title h2 { font-size:1.3rem; }
    .product-card-img { aspect-ratio:1/1; }
    .product-card-body { padding:12px; gap:5px; }
    .product-card-body h4 { font-size:0.85rem; line-height:1.3; }
    .product-card-desc { font-size:0.76rem; -webkit-line-clamp:2; }
    .product-price { font-size:0.95rem; }
}

/* ============================================================
   v2.6 — Storefront pop-ups
   (Admin ▸ White Label & Settings ▸ Pop-ups)
   Cookie-consent banner + under-construction/maintenance modal.
   Both follow the white-label theme variables automatically.
   ============================================================ */
.wl-cookiebar {
    position:fixed; left:18px; bottom:18px; z-index:1200;
    max-width:430px; width:calc(100% - 36px);
    background:var(--surface); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg);
    border:1px solid var(--border); padding:18px 18px 16px;
    animation:wlPopIn .35s ease;
}
.wl-cookiebar[hidden] { display:none!important; }
.wl-cookiebar-inner { display:flex; align-items:flex-start; gap:14px; }
.wl-cookiebar-icon {
    flex:0 0 auto; width:42px; height:42px; border-radius:12px;
    background:color-mix(in srgb, var(--primary) 12%, transparent);
    color:var(--primary); display:flex; align-items:center; justify-content:center; font-size:1.15rem;
}
.wl-cookiebar-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }

.wl-modal-overlay {
    position:fixed; inset:0; z-index:1300; display:flex; align-items:center; justify-content:center;
    background:color-mix(in srgb, var(--dark) 55%, transparent); backdrop-filter:blur(3px); padding:24px;
    opacity:0; visibility:hidden; transition:opacity .3s ease, visibility .3s ease;
}
.wl-modal-overlay.shown { opacity:1; visibility:visible; }
.wl-modal {
    position:relative; max-width:460px; width:100%; background:var(--surface); border-radius:var(--radius-lg);
    box-shadow:var(--shadow-lg); padding:34px 28px 28px; text-align:center;
    transform:translateY(14px) scale(.97); transition:transform .3s ease;
}
.wl-modal-overlay.shown .wl-modal { transform:translateY(0) scale(1); }
.wl-modal-close {
    position:absolute; top:12px; right:14px; border:none; background:transparent; cursor:pointer;
    font-size:1.4rem; line-height:1; color:var(--gray);
}
.wl-modal-close:hover { color:var(--heading); }

/* ============================================================
   ★ v7.86 — FIREARMS & AMMUNITION PRESENTATION
   shop.php · store.php · product.php all render from
   includes/storefront-product.php, so these are the only rules
   that describe a firearm or a box of ammunition.
   ============================================================ */

/* The image frame carries an absolutely-positioned flag, so it must be the positioning context
   (both pages used to do this with an inline style on one page only). */
.product-card-img, .store-card-img { position:relative; }

.sf-flag { position:absolute; top:10px; left:10px; z-index:2; color:var(--white);
    font-size:.68rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
    padding:4px 10px; border-radius:999px; }
.sf-flag-sold { background:var(--danger); }
.sf-flag-out  { background:var(--gray); }
/* ★ v7.102 — an item the shop can ORDER is an opportunity, not a warning: the brand colour, so it
   reads differently at a glance from the grey "out of stock" it replaces. */
.sf-flag-order { background:var(--primary); }

.sf-card-chips { display:flex; gap:6px; flex-wrap:wrap; }
.sf-card-maker { font-size:.78rem; }
/* The facts under the title: calibre, condition, box size — never a repeat of the name. */
.sf-spec { font-size:.82rem; font-weight:600; color:var(--heading); }
.sf-per-round { font-size:.78rem; color:var(--gray); margin-top:-2px; }
/* What you must do to buy it — the line that was missing entirely before v7.86. */
.sf-licence { display:flex; align-items:center; gap:7px; font-size:.74rem; font-weight:600;
    color:var(--warning-ink); background:color-mix(in srgb, var(--warning) 12%, transparent);
    border-radius:8px; padding:6px 9px; line-height:1.35; }
.sf-licence i { font-size:.8rem; }
/* ★ v7.90 — "How to apply for a licence": the SECOND information area on a firearm. The first
   (v7.89, .pd-buy) says what happens at the counter; this one answers what must happen BEFORE that.
   Tinted with the primary token rather than the warning token so the two blocks never read as one.
   Shared by the product page, the popup and firearm-licence.php. */
.sf-licence-link { display:inline-flex; align-items:center; gap:6px; margin-top:7px;
    font-size:.76rem; font-weight:700; color:var(--primary); text-decoration:none; }
.sf-licence-link:hover { text-decoration:underline; }
.sf-guide { margin-top:16px; padding:16px 18px; border-radius:var(--radius-lg);
    background:color-mix(in srgb, var(--primary) 7%, transparent);
    border:1px solid color-mix(in srgb, var(--primary) 26%, transparent); }
.sf-guide-title { display:flex; align-items:center; gap:9px; margin:0 0 8px;
    font-size:1.02rem; color:var(--heading); }
.sf-guide-title i { color:var(--primary); }
.sf-guide-sub { display:flex; align-items:center; gap:8px; margin:18px 0 8px;
    font-size:.95rem; color:var(--heading); }
.sf-guide-sub i { color:var(--primary); }
.sf-guide-intro { margin:0 0 10px; font-size:.88rem; line-height:1.6; color:var(--text); }
.sf-guide-muted { margin:0 0 10px; font-size:.82rem; color:var(--gray); }
.sf-guide-for { margin:10px 0; padding:9px 11px; border-radius:9px; font-size:.85rem; line-height:1.5;
    background:color-mix(in srgb, var(--primary) 12%, transparent); color:var(--heading); }
.sf-guide-for i { color:var(--primary); margin-right:5px; }
.sf-guide-steps { margin:0; padding-left:20px; display:flex; flex-direction:column; gap:7px;
    font-size:.87rem; line-height:1.6; color:var(--text); }
.sf-guide-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.sf-guide-note { margin:12px 0 0; font-size:.83rem; line-height:1.5; color:var(--gray); }
.sf-guide-note i { color:var(--primary); margin-right:5px; }
.sf-guide-page { max-width:820px; margin:0 auto; }
.sf-guide-cta { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:28px; }

/* ★ v7.92 — the guide's two tabs: "The road, in order" and "What is proficiency training?".
   CSS-ONLY (two radios, two labels, two panels) so the page and the popup share one renderer with no
   JavaScript at all. The panels are VISIBLE by default and only hidden inside @supports — a browser
   that cannot do :has() shows both one after the other, which is a readable page, where the reverse
   arrangement would hide the content entirely. */
.sf-tabs { margin-top:4px; }
.sf-tabs .sf-tab-r { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.sf-tabbar { display:flex; gap:4px; flex-wrap:wrap; margin:0 0 16px;
    border-bottom:1px solid var(--border); }
.sf-tab { display:inline-flex; align-items:center; gap:7px; padding:9px 13px; cursor:pointer;
    margin-bottom:-1px; font-size:.85rem; font-weight:700; color:var(--gray);
    border-bottom:2px solid transparent; transition:var(--transition); }
.sf-tab:hover { color:var(--primary); }
.sf-tab i { font-size:.8rem; }
/* Keyboard: the radios are focusable (and arrow keys switch), so the active tab must show a ring. */
.sf-tab-r-road:focus-visible ~ .sf-tabbar label[for$="-road"],
.sf-tab-r-prof:focus-visible ~ .sf-tabbar label[for$="-prof"] {
    outline:2px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset:2px;
    border-radius:6px; }
@supports selector(:has(*)) {
    .sf-tabs .sf-tabpanel { display:none; }
    .sf-tabs:has(.sf-tab-r-road:checked) .sf-panel-road,
    .sf-tabs:has(.sf-tab-r-prof:checked) .sf-panel-prof { display:block; }
    .sf-tabs:has(.sf-tab-r-road:checked) label[for$="-road"],
    .sf-tabs:has(.sf-tab-r-prof:checked) label[for$="-prof"] {
        color:var(--primary); border-bottom-color:var(--primary); }
}

/* ★ v7.93 — the COURSE block ("How this course works"): the same box as the licence block with a
   different accent, because a course is training rather than a firearm (the two never share a page). */
.sf-guide-course .sf-guide-title i { color:var(--secondary); }
.sf-guide-course .sf-guide-for i { color:var(--secondary); }

/* ★ v7.95 — "What's in this bundle": the item list, the option list and the saving. */
.sf-bundle-list { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; }
.sf-bundle-list li { display:flex; align-items:baseline; justify-content:space-between; gap:14px;
    font-size:.87rem; color:var(--text); padding-bottom:6px;
    border-bottom:1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.sf-bundle-list li:last-child { border-bottom:0; padding-bottom:0; }
.sf-bundle-list em { font-style:normal; color:var(--gray); font-size:.8rem; }
.sf-bundle-price { white-space:nowrap; font-weight:600; color:var(--heading);
    font-variant-numeric:tabular-nums; }
.sf-bundle-total { display:flex; flex-wrap:wrap; gap:6px 18px; align-items:baseline; margin-top:14px;
    padding-top:12px; border-top:1px solid var(--border); font-size:.88rem; color:var(--text); }
.sf-bundle-total strong { color:var(--heading); }
.sf-bundle-save { font-weight:800; color:var(--success-ink, var(--primary)); }
/* ★ v7.97 — the main product reads as a ROW of the list (bold), and "and"/"or" say what the groups
   mean: the included items come with the bundle, the options are a choice. */
.sf-bundle-main > span:first-child { font-weight:700; color:var(--heading); }
.sf-bundle-main i { margin-right:5px; font-size:.78rem; color:var(--primary); }
.sf-bundle-join { justify-content:flex-start; border-bottom:0; padding:3px 0 1px; }
.sf-bundle-join > span { font-size:.72rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase;
    color:var(--gray); }
.sf-bundle-join-head > span { color:var(--primary); }

/* The proficiency-training FAQ: a definition list, because that is what a question and its answer is. */
.sf-faq { margin:0; }
.sf-faq dt { display:flex; align-items:flex-start; gap:8px; margin:16px 0 5px;
    font-size:.9rem; font-weight:700; color:var(--heading); }
.sf-faq dt:first-child { margin-top:0; }
.sf-faq dt i { margin-top:3px; font-size:.82rem; color:var(--primary); }
.sf-faq dd { margin:0 0 0 21px; font-size:.87rem; line-height:1.6; color:var(--text); }
.sf-faq dd strong { color:var(--heading); }

/* The competency table — the row that applies to the firearm on screen is highlighted, so a visitor
   finds their own line instead of working out which one they are. */
.sf-guide-tablewrap { overflow-x:auto; margin:0 0 6px; }
.sf-guide-table { width:100%; border-collapse:collapse; font-size:.85rem; }
.sf-guide-table th { text-align:left; font-size:.72rem; letter-spacing:.06em; text-transform:uppercase;
    color:var(--gray); padding:8px 10px; border-bottom:1px solid var(--border); }
.sf-guide-table td { padding:9px 10px; color:var(--text); vertical-align:top;
    border-bottom:1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.sf-guide-table td strong { color:var(--heading); }
.sf-guide-unit { white-space:nowrap; font-variant-numeric:tabular-nums; color:var(--gray); }
.sf-guide-hit { background:color-mix(in srgb, var(--primary) 12%, transparent); }
.sf-guide-hit td { color:var(--heading); }
/* ★ v7.91 — the third column is the BOOKING PATH: the shop's own course for that competency. */
.sf-guide-book { display:inline-flex; align-items:center; gap:7px; font-weight:700;
    color:var(--primary); text-decoration:none; }
.sf-guide-book:hover { text-decoration:underline; }
.sf-guide-book i { font-size:.72rem; transition:var(--transition); }
.sf-guide-book:hover i { transform:translateX(3px); }
.sf-guide-price { color:var(--gray); font-size:.8rem; white-space:nowrap; }
.sf-guide-ask { color:var(--gray); font-weight:600; text-decoration:none; }
.sf-guide-ask:hover { color:var(--primary); text-decoration:underline; }

/* The popup: the whole road without leaving the firearm. Native <dialog>, so Escape, the backdrop
   and focus trapping are the browser's job — only the look is ours. */
/* ★ v7.113 — the dialog's scrim and lift are mixed from --dark like
   .modal-overlay above them, instead of a near-black literal that never
   re-branded (and could never follow the palette). */
.sf-dlg { width:min(760px, 92vw); max-height:88vh; padding:0; border:0;
    border-radius:var(--radius-lg); background:var(--surface); color:var(--text);
    box-shadow:0 30px 70px color-mix(in srgb, var(--dark) 35%, transparent); }
.sf-dlg::backdrop { background:color-mix(in srgb, var(--dark) 62%, transparent); }
.sf-dlg-head { position:sticky; top:0; z-index:1; display:flex; align-items:center;
    justify-content:space-between; gap:14px; padding:16px 20px;
    border-bottom:1px solid var(--border); background:var(--surface);
    border-radius:var(--radius-lg) var(--radius-lg) 0 0; }
.sf-dlg-head h2 { display:flex; align-items:center; gap:9px; margin:0; font-size:1.05rem; color:var(--heading); }
.sf-dlg-head h2 i { color:var(--primary); }
.sf-dlg-x { border:0; background:transparent; color:var(--gray); font-size:1.6rem; line-height:1;
    padding:2px 6px; border-radius:8px; cursor:pointer; transition:var(--transition); }
.sf-dlg-x:hover { color:var(--danger); background:color-mix(in srgb, var(--danger) 10%, transparent); }
.sf-dlg-body { padding:18px 20px; overflow:auto; }
.sf-dlg-foot { display:flex; gap:10px; justify-content:flex-end; padding:14px 20px;
    border-top:1px solid var(--border); background:var(--surface); }

/* A rifle and a box of ammunition should not look like the same thing at a glance. */
.product-card.sf-kind-firearm, .store-card.sf-kind-firearm { border-left:3px solid var(--danger); }
.product-card.sf-kind-ammo,    .store-card.sf-kind-ammo    { border-left:3px solid var(--warning); }

/* Action row — was defined only in shop.php's inline block, so store cards had none. */
.pc-actions { margin-top:auto; padding-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
.pc-actions .btn { flex:1 1 auto; min-width:0; }

/* ---- the kind chips: navigation above the grid, never hidden by the small-catalogue rule ---- */
.sf-kindbar { max-width:1180px; margin:20px auto 0; padding:0 24px;
    display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.sf-kindbar-label { font-size:.78rem; font-weight:800; letter-spacing:.08em;
    text-transform:uppercase; color:var(--gray); }
.sf-kindchip { display:inline-flex; align-items:center; padding:8px 16px; border-radius:999px;
    border:1.5px solid var(--border); background:var(--surface); color:var(--text);
    font-size:.85rem; font-weight:700; text-decoration:none; transition:var(--transition); }
.sf-kindchip:hover { border-color:var(--primary); color:var(--primary-hover); }
.sf-kindchip.on { background:var(--primary); border-color:var(--primary); color:var(--white); }
@media (max-width:699px) { .sf-kindbar { padding:0 14px; } }
.wl-modal-icon {
    width:64px; height:64px; margin:0 auto 16px; border-radius:18px;
    background:color-mix(in srgb, var(--primary) 12%, transparent);
    color:var(--primary); display:flex; align-items:center; justify-content:center; font-size:1.7rem;
}
.wl-modal h3 { margin-bottom:10px; }
.wl-modal p { color:var(--text); font-size:.95rem; margin-bottom:20px; }

@keyframes wlPopIn {
    from { opacity:0; transform:translateY(18px); }
    to   { opacity:1; transform:translateY(0); }
}

@media (max-width:640px) {
    .wl-cookiebar { left:12px; right:12px; bottom:12px; width:auto; max-width:none; padding:16px; }
    .wl-cookiebar-inner { flex-wrap:wrap; }
}
/* The badge pills use the semantic *-ink tokens, which flip in the dark
   theme (see css/theme.php), so no separate dark-mode badge block is needed. */
