/*  Vendorea Exchange — public marketplace.
    Palette and type taken from the supplied bazaar design: deep navy ground, gold accent,
    heavy condensed headings. Kept as hand-written CSS rather than a framework because this
    site is a handful of public pages and every byte is served to anonymous visitors.        */

:root {
    --navy-900: #0A1B3D;
    --navy-800: #0F2A5C;
    --navy-700: #16386F;
    --ink: #17212F;
    --body: #46566B;
    --muted: #7A8AA0;
    --ground: #F5F7FB;
    --surface: #FFFFFF;
    --rule: #DDE4EE;
    --blue: #1D5BD6;
    --gold: #F5C518;
    --gold-ink: #6A5200;
    --green: #178A55;
}

* { box-sizing: border-box; }

body {
    /* A short page - a single listing, an empty search - otherwise leaves the footer stranded
       mid-screen with the ground below it, which reads as a page that failed to finish loading. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--ground);
    color: var(--body);
    font: 16px/1.6 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.12; letter-spacing: -.02em; margin: 0; }

/* The marketplace runs wide — content spans ~95% of the viewport, capped on very large screens so
   lines of text and the card grid do not stretch past comfort. A narrower reading measure is
   restored per-section where it helps (the "how it works" prose, the empty state). */
.shell { width: 99%; max-width: 150rem; margin: 0 auto; padding: 0 1rem; }

/* ── masthead ─────────────────────────────────────────────── */
.masthead { background: var(--surface); border-bottom: 1px solid var(--rule); }
.masthead-inner { display: flex; align-items: center; gap: 2rem; padding: .9rem 1.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-size: 1.15rem; }
.brand-mark { color: var(--blue); font-size: 1.4rem; }
.brand-name b { color: var(--blue); }
.masthead-nav { display: flex; gap: 1.4rem; margin-right: auto; }
.masthead-nav a { color: var(--body); text-decoration: none; font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; }
.masthead-nav a:hover, .masthead-nav a:focus-visible { color: var(--blue); border-bottom-color: var(--blue); }
.masthead-actions { display: flex; gap: .6rem; }

/* ── buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-block; padding: .55rem 1.1rem; border-radius: 6px;
    font-weight: 600; text-decoration: none; border: 1px solid transparent;
    cursor: pointer; transition: transform .08s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: #FFD642; }
.btn-quiet { background: var(--surface); color: var(--blue); border-color: var(--rule); }
.btn-quiet:hover { border-color: var(--blue); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { border-color: #fff; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1.05rem; }

/* ── hero ─────────────────────────────────────────────────── */
.hero {
    /* The photograph carries itself. Its left two-fifths is a deep navy panel — that is not an
       accident of the picture, it is where the headline is meant to go — so the text sits on the
       image's own dark ground and nothing is laid over the top to dull it. */
    background-color: var(--navy-900);
    background-image: url("../img/hero-warehouse.jpg");
    background-image: image-set(url("../img/hero-warehouse.webp") type("image/webp"),
                                url("../img/hero-warehouse.jpg") type("image/jpeg"));
    background-size: cover;
    /* Anchored left so that dark panel stays under the text as the viewport narrows and `cover`
       crops the width away. Anchoring anywhere else slides the warehouse under the headline. */
    background-position: left center;
    background-repeat: no-repeat;

    color: #fff;
    min-height: 34rem;
    display: flex;
    align-items: center;
}

/* The hero breaks out of the centred page column: its text belongs against the left edge,
   over the dark part of the picture, not floated into the middle of the warehouse. */
.hero .shell {
    max-width: none;
    margin: 0;
    padding-left: clamp(1.5rem, 5vw, 5.5rem);
    padding-right: 1.5rem;
}

.hero-inner {
    /* Held to the width of the dark panel. Wider and the last word of the headline crosses onto
       the shelving, which is the one place this design cannot afford to put white text. */
    max-width: 36rem;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero .gold { color: var(--gold); }

.hero-eyebrow {
    color: #A9C2EC; letter-spacing: .12em; text-transform: uppercase;
    font-size: .78rem; font-weight: 700; margin: 0 0 1rem;
}

.hero-lead { color: #D4E0F2; max-width: 40ch; font-size: 1.08rem; }

.hero-actions { display: flex; gap: .8rem; margin-top: 1.8rem; flex-wrap: wrap; }

/* ── categories ───────────────────────────────────────────── */
.categories { background: var(--surface); border-bottom: 1px solid var(--rule); }
.category-strip { display: flex; gap: .6rem; overflow-x: auto; padding: 1rem 1.5rem; }
.category {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .35rem;
    min-width: 6.5rem; padding: .75rem .6rem; border: 1px solid var(--rule); border-radius: 8px;
    text-decoration: none; color: var(--body); font-size: .82rem; font-weight: 600; text-align: center;
}
.category:hover { border-color: var(--blue); color: var(--blue); }
.category span { font-size: 1.3rem; }

/* ── listings ─────────────────────────────────────────────── */
.listings { padding: 3rem 0; }
.section-head { margin-bottom: 1.6rem; }
.section-head h2 { font-size: 1.7rem; }
.section-head p { margin: .3rem 0 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.card {
    background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
    padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .7rem;
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.badge {
    background: #E8F0FE; color: var(--blue); font-size: .68rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 4px;
}
.condition { color: var(--muted); font-size: .78rem; }
.card h3 { font-size: 1.02rem; }

.facts { display: grid; grid-template-columns: 6rem 1fr; gap: .25rem .8rem; margin: 0; font-size: .87rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }
.withheld { color: var(--muted); font-style: italic; }

/* Price and action stacked rather than side by side: at card width a quote-required label and
   a button cannot share a row without both wrapping mid-phrase. */
.card-foot {
    display: flex; flex-direction: column; align-items: stretch; gap: .55rem;
    margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--rule);
}
.card-foot .btn { text-align: center; }
.price { font-size: 1.15rem; font-weight: 700; color: var(--green); }
.price.quote { font-size: .9rem; color: var(--muted); font-weight: 600; }

/* ── empty state ──────────────────────────────────────────── */
.empty {
    background: var(--surface); border: 1px dashed var(--rule); border-radius: 10px;
    padding: 3rem 2rem; text-align: center; max-width: 42rem; margin: 0 auto;
}
.empty-title { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 0 0 .5rem; }
.empty p { margin: 0 auto 1.4rem; max-width: 46ch; }

/* ── how it works ─────────────────────────────────────────── */
.how { background: var(--surface); border-top: 1px solid var(--rule); padding: 3rem 0; }
.how h2 { font-size: 1.5rem; margin-bottom: 1.2rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.2rem; padding-left: 1.1rem; margin: 0; }
.steps li { padding-left: .3rem; }
.steps b { color: var(--ink); }

/* ── footer ───────────────────────────────────────────────── */
main { flex: 1 0 auto; }

.footer { flex-shrink: 0; background: var(--navy-900); color: #A9BEDF; padding: 2rem 0; margin-top: 3rem; }
.footer p { margin: 0 0 .3rem; }
.footer-fine { color: #6F87AE; font-size: .85rem; }

@media (max-width: 760px) {
    .masthead-nav { order: 3; width: 100%; overflow-x: auto; }

    /* A 2.9:1 photograph in a portrait box crops to a sliver. Anchored left it is the picture's
       own navy panel that fills it — the original image, at its own brightness, just the calm
       part of it. */
    .hero {
        padding: 3rem 0 2.5rem;
        min-height: 26rem;
        background-position: left center;
    }
}

/* ── finder: search and filters ───────────────────────────── */
.finder { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.15rem; margin-bottom: 1.8rem; }
.finder-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.finder-row-quiet { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--rule); font-size: .88rem; color: var(--muted); }
.finder-search { flex: 1 1 18rem; min-width: 12rem; }
.finder-search, .finder-select, .finder-number, .finder-text {
    padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: 6px;
    font: inherit; color: var(--ink); background: var(--surface);
}
.finder-select { flex: 0 1 13rem; }
.finder-number { width: 6rem; }
.finder-text { width: 9rem; }
.finder-search:focus-visible, .finder-select:focus-visible,
.finder-number:focus-visible, .finder-text:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.check, .inline-field { display: inline-flex; align-items: center; gap: .4rem; }
.clear { color: var(--blue); margin-left: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.card-link { color: inherit; text-decoration: none; }
.card-link:hover { color: var(--blue); }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.6rem; }
.pager-where { color: var(--muted); font-size: .9rem; }

/* ── listing detail ───────────────────────────────────────── */
.detail { padding: 2rem 1.5rem 3rem; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1.2rem; display: flex; gap: .5rem; }
.crumbs a { color: var(--blue); text-decoration: none; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.detail-badges { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.detail-title { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; margin-bottom: .6rem; }
.detail-lead { font-size: 1.02rem; margin-bottom: 1.4rem; }
.detail-sub { font-size: 1.1rem; margin: 1.8rem 0 .7rem; }
.detail-facts { display: grid; grid-template-columns: 10rem 1fr; gap: .4rem 1rem; margin: 0; font-size: .95rem; }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; color: var(--ink); }
@media (max-width: 520px) { .detail-facts { grid-template-columns: 1fr; gap: 0 0; } .detail-facts dd { margin-bottom: .6rem; } }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }

.note-box { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-radius: 8px; padding: .9rem 1.1rem; margin-top: 1.4rem; }
.note-label { display: block; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.note-box p { margin: 0; }

.detail-action { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1.3rem; position: sticky; top: 1.5rem; }
@media (max-width: 860px) { .detail-action { position: static; } }
.price-block { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.price-note { margin: .3rem 0 0; font-size: .88rem; color: var(--muted); }
.btn-block { display: block; width: 100%; text-align: center; margin-bottom: .6rem; }
.reassure { font-size: .85rem; color: var(--muted); margin: 1rem 0 0; }

/* ─────────────────────────────────────────────────────────────────────────────────────────
   Buyer accounts.

   The only forms on this site. Narrow and centred rather than laid out across the page: a
   sign-in page with nothing to compare against does not need the width, and a single column
   makes the order of the fields the only thing to follow.
   ───────────────────────────────────────────────────────────────────────────────────────── */

.account {
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 4.5rem;
}

.account-wide { max-width: 46rem; }

.account-card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 2rem;
}

.account h1 {
    font-size: 1.75rem;
    line-height: 1.15;
    margin: 0 0 .5rem;
    color: var(--ink);
    text-wrap: balance;
}

.account-lead {
    margin: 0 0 2rem;
    color: var(--body);
    line-height: 1.6;
}

.field { margin-bottom: 1.25rem; }

.field label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: var(--ink);
    margin-bottom: .375rem;
}

.field input {
    width: 100%;
    padding: .625rem .75rem;
    font: inherit;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
}

.field input:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
    border-color: var(--blue);
}

.field-hint {
    display: block;
    margin-top: .375rem;
    font-size: .8125rem;
    color: var(--muted);
}

.field-error,
.validation-summary-errors {
    color: #B42318;
    font-size: .875rem;
}

.field-error { display: block; margin-top: .375rem; }

.validation-summary-errors {
    background: #FEF3F2;
    border: 1px solid #FDA29B;
    border-radius: 6px;
    padding: .75rem 1rem;
    margin-bottom: 1.5rem;
}

.validation-summary-errors ul { margin: 0; padding-left: 1.25rem; }

/* Two fields that belong on one line on a wide screen and never on a narrow one. */
.field-pair {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 30rem) {
    .field-pair { grid-template-columns: 1fr 1fr; }
}

.account-alt {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    font-size: .9375rem;
    color: var(--body);
}

.account-alt p { margin: 0 0 .5rem; }
.account-alt p:last-child { margin-bottom: 0; }

/* The other door. A Vendorea tenant signs in at their own portal, and saying so here is what
   stops them creating a second account for a company the platform already knows. */
.account-tenant {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--ground);
    border: 1px solid var(--rule);
    border-radius: 8px;
    font-size: .9375rem;
    color: var(--body);
    line-height: 1.6;
}

.account-tenant strong { color: var(--ink); }

.account-note {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: .9375rem;
    line-height: 1.6;
}

.account-note-good { background: #ECFDF3; border: 1px solid #A6F4C5; color: #05603A; }
.account-note-bad  { background: #FEF3F2; border: 1px solid #FDA29B; color: #B42318; }

/* Verification, as a ladder the buyer can see themselves on. Four rungs, and which one you are
   on decides whether a price is shown to you — so it is worth showing plainly rather than
   leaving a buyer to wonder why a listing says "on request". */
.rungs { list-style: none; margin: 0; padding: 0; }

.rung {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
    padding: .875rem 0;
    border-bottom: 1px solid var(--rule);
}

.rung:last-child { border-bottom: 0; }

.rung-mark {
    flex: 0 0 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .8125rem;
    font-weight: 700;
    background: var(--ground);
    border: 1px solid var(--rule);
    color: var(--muted);
}

.rung-done .rung-mark {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.rung-name { font-weight: 600; color: var(--ink); }
.rung-done .rung-name { color: var(--ink); }
.rung-what { font-size: .875rem; color: var(--body); margin-top: .125rem; }

.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.account-stat {
    background: var(--ground);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: .875rem 1rem;
}

.account-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.account-stat-label { font-size: .8125rem; color: var(--muted); }

/* The masthead's third state: signed in, and it matters which kind. */
.masthead-who {
    font-size: .875rem;
    color: rgba(255, 255, 255, .75);
    align-self: center;
    white-space: nowrap;
}

.masthead-who strong { color: #fff; }

/* A sign-out has to be a POST, and a form inside a flex row otherwise adds its own block. */
.signout-form { display: inline; margin: 0; }

@media (max-width: 40rem) {
    .masthead-who { display: none; }
}

/* The seller's posted price, shown on the enquiry form. A buyer asking without sight of it cannot
   tell a quote from the advertised figure when it arrives. */
.enquiry-listed {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--rule);
    font-size: .875rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .375rem;
}

.enquiry-listed-label {
    font-weight: 600;
    color: var(--ink);
}

.enquiry-listed-price {
    font-size: 1.125rem;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* Its own line: it qualifies the figure rather than sitting beside it as another fact. */
.enquiry-listed-note {
    flex-basis: 100%;
    color: var(--muted);
    font-size: .8125rem;
}

/* ─────────────────────────────────────────────────────────────────────────────────────────
   A buyer's enquiries.

   Grouped by what is owed to whom rather than listed by date: a quote sitting unanswered is
   the thing most easily missed here, because the seller has done their part and the buyer may
   never know. So "needing your decision" leads, and "finished" is quiet at the bottom.
   ───────────────────────────────────────────────────────────────────────────────────────── */

.enquiry-group {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin: 2rem 0 .75rem;
    letter-spacing: .01em;
}

.enquiry-group:first-of-type { margin-top: 1rem; }

.enquiry-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}

.enquiry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--rule);
}

.enquiry-row:last-child { border-bottom: 0; }

/* A left edge in the accent, not a background wash: it marks the row without shouting over the
   figures, which are the part being compared. */
.enquiry-row-live { box-shadow: inset 3px 0 0 var(--gold); }
.enquiry-row-quiet { color: var(--muted); }

.enquiry-row-main {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

a.enquiry-row-main:hover .enquiry-row-title { text-decoration: underline; }

.enquiry-row-title {
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enquiry-row-quiet .enquiry-row-title { color: var(--body); }

.enquiry-row-meta { font-size: .8125rem; color: var(--muted); }

.enquiry-row-price {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: .9375rem;
}

.enquiry-row-status {
    font-size: .8125rem;
    color: var(--body);
    white-space: nowrap;
}

@media (max-width: 46rem) {
    /* The status and the action stay; the price folds under the title rather than squeezing
       four columns into a phone. */
    .enquiry-row {
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: .5rem;
    }

    .enquiry-row-price { grid-column: 1; }
    .enquiry-row-status { grid-column: 1; }
}

/* The quote itself: three figures a buyer reads together, so they are laid out together. */
.quote-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1.5rem;
}

.quote-figure-label { font-size: .8125rem; color: var(--muted); }

.quote-figure {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.quote-figure-note { font-size: .8125rem; color: var(--muted); margin-top: .25rem; }
.quote-better { color: var(--green); }
.quote-expired { color: #B42318; font-weight: 600; }

.quote-note {
    margin: 1.25rem 0 0;
    padding-left: 1rem;
    border-left: 3px solid var(--rule);
    color: var(--body);
    font-style: italic;
}

.quote-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.quote-actions form { margin: 0; }

.quote-facts {
    display: grid;
    grid-template-columns: minmax(7rem, auto) 1fr;
    gap: .5rem 1.5rem;
    margin: 0;
}

.quote-facts dt { color: var(--muted); font-size: .9375rem; }
.quote-facts dd { margin: 0; color: var(--ink); font-size: .9375rem; }

/* An order's progress, for the buyer. Simpler than the seller's version on purpose: a buyer has
   nothing to do here, so the track only has to answer "where is it". */
.buyer-pipeline {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.buyer-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9375rem;
    color: var(--muted);
}

.buyer-step-mark {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .75rem;
    border: 2px solid var(--rule);
}

.buyer-step-done {
    color: var(--ink);
    font-weight: 600;
}

.buyer-step-done .buyer-step-mark {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.order-lines {
    width: 100%;
    border-collapse: collapse;
    font-size: .9375rem;
}

.order-lines th,
.order-lines td {
    padding: .625rem .5rem;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

.order-lines th {
    font-size: .8125rem;
    color: var(--muted);
    font-weight: 600;
}

.order-lines .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-lines tfoot td { border-bottom: 0; padding-top: .375rem; padding-bottom: .375rem; }

.order-lines .order-total td {
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--ink);
    border-top: 1px solid var(--rule);
    padding-top: .625rem;
}

/* The total on the buy confirmation. Given its own block rather than a line of body text: it is
   the number somebody is about to commit to, and a confirm step whose figure has to be hunted
   for is not confirming anything. */
.buy-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .625rem;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--ground);
    border: 1px solid var(--rule);
    border-radius: 8px;
}

.buy-total-label { font-weight: 600; color: var(--ink); }

.buy-total-figure {
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.buy-total-note {
    flex-basis: 100%;
    font-size: .8125rem;
    color: var(--muted);
}

/* Listing pictures.

   The card thumbnail is hidden from assistive technology and skipped by the keyboard: the title
   right beneath it is the real link to the same place, and a second one announcing the same
   destination is noise to anybody not looking at it. */
.card-thumb {
    display: block;
    margin: -1px -1px .75rem;
    border-radius: 9px 9px 0 0;
    overflow: hidden;
    background: var(--ground);
}

.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* The detail gallery. First picture large, the rest as a strip — a buyer wants one good look and
   then the details, not a carousel to operate. */
.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: .625rem;
    margin: 1.25rem 0 1.5rem;
}

.detail-gallery img {
    width: 100%;
    border: 1px solid var(--rule);
    border-radius: 8px;
    background: var(--surface);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* The first one gets the room, on anything wider than a phone. */
@media (min-width: 34rem) {
    .detail-gallery { grid-template-columns: 2fr 1fr 1fr; }
    .detail-gallery img:first-child { grid-row: span 2; aspect-ratio: 4 / 3; }
}

/* A message thread on the buyer's side of the marketplace. Sides rather than a table, because the
   useful thing at a glance is who said what. */
.buyer-thread {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-height: 22rem;
    overflow-y: auto;
}

.buyer-message { max-width: 85%; }
.buyer-message-mine { align-self: flex-end; }
.buyer-message-theirs { align-self: flex-start; }

.buyer-message-body {
    padding: .625rem .875rem;
    border-radius: 10px;
    font-size: .9375rem;
    line-height: 1.5;
    white-space: pre-line;
}

.buyer-message-mine .buyer-message-body {
    background: var(--navy-800);
    color: #EAF0F9;
    border-bottom-right-radius: 3px;
}

.buyer-message-theirs .buyer-message-body {
    background: var(--ground);
    color: var(--ink);
    border-bottom-left-radius: 3px;
}

.buyer-message-meta { font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.buyer-message-mine .buyer-message-meta { text-align: right; }

/* Reporting a listing. Deliberately the quietest thing in the sidebar: it is the rare case, and
   giving it the weight of a primary action would invite reports rather than collect them. */
.report-listing {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
}

.report-listing > summary {
    cursor: pointer;
    font-size: .8125rem;
    color: var(--muted);
    list-style: none;
}

.report-listing > summary::-webkit-details-marker { display: none; }

.report-listing > summary::before {
    content: "\26A0";
    margin-right: .4rem;
    opacity: .7;
}

.report-listing > summary:hover { color: var(--ink); }

.report-listing > summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 3px;
}

.report-listing[open] > summary {
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 1rem;
}

.report-listing select,
.report-listing textarea {
    width: 100%;
    padding: .5rem .625rem;
    border: 1px solid var(--rule);
    border-radius: 6px;
    font: inherit;
    font-size: .875rem;
    color: var(--ink);
    background: var(--surface);
}

.report-listing select:focus-visible,
.report-listing textarea:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
    border-color: var(--blue);
}

.report-listing textarea { resize: vertical; min-height: 4.5rem; }

/* Closing an account. Set apart from everything above it and given the only red on the page, because
   it is the one action here that cannot be undone. Deliberately collapsed: nobody arrives at their
   account page looking for this, and an open form inviting it would be an invitation. */
.account-danger {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

.account-danger > summary {
    cursor: pointer;
    font-size: .875rem;
    color: var(--muted);
    list-style: none;
}

.account-danger > summary::-webkit-details-marker { display: none; }

.account-danger > summary::before {
    content: "\203A";
    display: inline-block;
    margin-right: .45rem;
    transition: transform .15s ease;
}

.account-danger[open] > summary::before { transform: rotate(90deg); }

.account-danger > summary:hover { color: #B42318; }

.account-danger > summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 3px;
}

.account-danger[open] > summary {
    color: #B42318;
    font-weight: 600;
    margin-bottom: 1rem;
}

.account-danger p { font-size: .875rem; }

.account-danger form {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: #FEF3F2;
    border: 1px solid #FDA29B;
    border-radius: 8px;
}

.btn-danger {
    background: #B42318;
    color: #fff;
    border: 1px solid #B42318;
}

.btn-danger:hover { background: #912018; border-color: #912018; }

.btn-danger:focus-visible {
    outline: 2px solid #B42318;
    outline-offset: 2px;
}

/* Files sent with a message. Listed under what was said about them rather than beside it: a document
   with no covering sentence is the thing nobody can interpret six weeks later. */
.message-files {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.message-files li {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
}

.message-files a {
    font-size: .875rem;
    font-weight: 500;
    word-break: break-word;
}

.message-files a::before {
    content: "\1F4CE";
    margin-right: .35rem;
    opacity: .75;
}

.message-file-size {
    font-size: .75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.report-listing input[type="file"],
.account-danger input[type="file"],
.field input[type="file"] {
    width: 100%;
    padding: .45rem .5rem;
    border: 1px dashed var(--rule);
    border-radius: 6px;
    font: inherit;
    font-size: .8125rem;
    background: var(--surface);
}

.field input[type="file"]:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
    border-color: var(--blue);
    border-style: solid;
}

/* What Vendorea knows about a seller, as against what the seller says about themselves. Set as a
   short list of facts rather than badges or stars: there is no rating here and inventing the look of
   one would imply a score nothing computes. */
.seller-record {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: grid;
    gap: .75rem;
}

.seller-record li {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .7rem .9rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--blue);
    border-radius: 6px;
}

.seller-record strong {
    font-size: .9375rem;
    color: var(--ink);
}

.seller-record .muted { font-size: .8125rem; }

@media (min-width: 40rem) {
    .seller-record { grid-template-columns: 1fr 1fr; }
}

/* ── What a buyer needs: their own requests, and the offers on them ──────────────────────────── */

.request-list,
.offer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.request-card,
.offer-card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
}

.request-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.request-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
}

.request-status {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .2rem .5rem;
    border-radius: 3px;
    white-space: nowrap;
    background: var(--sunk, #EEF1F5);
    color: var(--muted);
}

.request-status-open { background: #ECFDF3; color: #05603A; }

.request-meta {
    margin: .4rem 0 0;
    font-size: .875rem;
    color: var(--muted);
}

.request-offers { margin-top: .9rem; }

/* Offers, cheapest first — so the figures are what the eye lands on. */
.offer-figures {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    flex-wrap: wrap;
}

.offer-price {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.offer-seller {
    margin: .35rem 0 0;
    font-size: .9375rem;
    color: var(--ink);
}

.offer-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.offer-actions form { margin: 0; }

/* ══════════════════════════════════════════════════════════════════════════════════════════
   MARKETPLACE REDESIGN — wide layout, coloured badges, deal pricing, clickable tiles, and the
   home-page section bands (Demand Board, Sponsored Spotlight, Fresh Activity). Added as one block
   so the original styles above stay legible; where a rule here restates an earlier selector it is
   a deliberate override and says so.
   ══════════════════════════════════════════════════════════════════════════════════════════ */

/* ── hero stat chips ──────────────────────────────────────── */
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 1.6rem; }
.hero-stat { display: flex; align-items: center; gap: .6rem; color: #fff; }
.hero-stat-mark {
    width: 2.2rem; height: 2.2rem; border-radius: 7px; display: grid; place-items: center;
    background: rgba(255,255,255,.14); font-size: 1.1rem; flex: none;
}
.hero-stat b { display: block; font-size: 1.15rem; line-height: 1.1; }
.hero-stat span { font-size: .82rem; color: rgba(255,255,255,.8); }

/* ── section heads with an action on the right ────────────── */
.band { padding: 2.6rem 0; }
.band + .band { padding-top: 0; }
.band-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem;
}
.band-head .band-title { display: flex; align-items: center; gap: .6rem; }
.band-head h2 { font-size: 1.55rem; }
.band-head .band-icon { font-size: 1.5rem; line-height: 1; }
.band-head .band-sub { color: var(--muted); font-size: .92rem; margin: 0; }
.band-link { color: var(--blue); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.band-link:hover { text-decoration: underline; }
.band-action {
    background: var(--blue); color: #fff; border: 0; border-radius: 7px;
    padding: .5rem .9rem; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap;
}
.band-action:hover { background: #1a4fb8; }
.band-action.is-green { background: var(--green); }
.band-action.is-green:hover { background: #126f44; }

/* A quiet tag marking a section whose contents are representative, not live data yet. */
.sample-tag {
    display: inline-block; margin-left: .5rem; font-size: .62rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
    background: var(--ground); border: 1px solid var(--rule); border-radius: 999px; padding: .15rem .5rem;
    vertical-align: middle;
}

/* ── featured grid: a touch denser across the wide page ───── */
.grid { grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: 1.1rem; }   /* override */

/* ── clickable card (whole tile is the link) ─────────────── */
.card { position: relative; transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease; }
.card:hover { box-shadow: 0 10px 24px rgba(16,34,64,.10); transform: translateY(-2px); border-color: #C7D3E6; }
/* The title link stretches to cover the whole card, so a click anywhere opens the listing. */
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.card-link:focus-visible { outline: none; }
/* The quick-action must stay clickable over the stretched link, so it sits above it. The thumb
   deliberately does NOT — it stays under the stretch so clicking the image opens the listing too. */
.card .cart-btn { position: relative; z-index: 2; }

/* ── coloured badges, one hue per listing type ───────────── */
.badge { background: var(--ground); color: var(--ink); }   /* neutral default; types below override */
.badge-closeout { background: #FDE7E7; color: #B42318; }
.badge-surplus  { background: #E3F5EC; color: #15794B; }
.badge-demand   { background: #FFEEDD; color: #B5540A; }
.badge-local    { background: #E4EEFE; color: #1A4FB8; }
.badge-bundle   { background: #EAE6FB; color: #5B3FD1; }
.badge-deal     { background: #E8F0FE; color: var(--blue); }
.badge-quote    { background: #EEF1F5; color: #52607A; }
.badge-sponsored{ background: #FFF4D6; color: var(--gold-ink); }

/* ── deal pricing: struck MSRP + highlighted deal price ──── */
.price-wrap { display: flex; flex-direction: column; gap: .15rem; }
.price-row { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.price { color: #B42318; }                                 /* override: deal price reads as a saving */
.price .unit { font-size: .8rem; font-weight: 600; color: var(--muted); }
.msrp { color: var(--muted); text-decoration: line-through; font-size: .9rem; font-weight: 600; }
.save-chip {
    font-size: .7rem; font-weight: 800; letter-spacing: .02em; color: #15794B;
    background: #E3F5EC; border-radius: 999px; padding: .1rem .45rem;
}
.price.quote { color: var(--muted); }                      /* keep quote-required muted, not red */

/* The card foot carries price on the left and the quick-action on the right. */
.card-foot {
    flex-direction: row; align-items: center; justify-content: space-between; gap: .6rem;   /* override */
}
.cart-btn {
    flex: none; width: 2.4rem; height: 2.4rem; border-radius: 8px; border: 1px solid var(--rule);
    background: var(--green); color: #fff; display: grid; place-items: center; font-size: 1.1rem;
    text-decoration: none; cursor: pointer; transition: background-color .14s ease, transform .08s ease;
}
.cart-btn:hover { background: #126f44; }
.cart-btn:active { transform: translateY(1px); }
.cart-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.cart-btn.is-quote { background: var(--blue); }
.cart-btn.is-quote:hover { background: #1a4fb8; }

/* ── Demand Board band ───────────────────────────────────── */
.demand-board { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.demand-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem;
}
.demand-card {
    border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.1rem;
    display: flex; flex-direction: column; gap: .55rem; background: var(--surface);
}
.demand-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.demand-when { color: var(--muted); font-size: .78rem; }
.demand-when b { color: #B42318; font-weight: 700; }
.demand-card h3 { font-size: 1rem; }
.demand-meta { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--body); }
.demand-meta .row { display: flex; align-items: center; gap: .4rem; }
.demand-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .3rem; }
.demand-offers { color: var(--blue); font-weight: 600; font-size: .85rem; }

.status-pill {
    font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    padding: .2rem .5rem; border-radius: 999px;
}
.status-asap     { background: #FDE7E7; color: #B42318; }
.status-multi    { background: #E4EEFE; color: #1A4FB8; }
.status-ongoing  { background: #E3F5EC; color: #15794B; }
.status-priority { background: #FFE4E4; color: #B42318; }
.status-recurring{ background: #EAE6FB; color: #5B3FD1; }

/* ── Sponsored Spotlight band ────────────────────────────── */
.spotlight-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
/* The product image shows in full (contain) in its own area, with the caption in a bar beneath —
   so nothing is cropped and no text sits over the product. */
.spotlight {
    display: flex; flex-direction: column; border: 1px solid var(--rule);
    border-radius: 12px; overflow: hidden; background: var(--surface); text-decoration: none;
    transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease;
}
.spotlight:hover { box-shadow: 0 10px 24px rgba(16,34,64,.10); transform: translateY(-2px); border-color: #C7D3E6; }
.spotlight-img {
    height: 9.5rem; background: #fff center / contain no-repeat; border-bottom: 1px solid var(--rule);
}
.spotlight-body { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.spotlight-body b { font-size: .98rem; line-height: 1.25; color: var(--ink); }
.spotlight-cta {
    align-self: flex-start; background: var(--blue); color: #fff;
    font-weight: 700; font-size: .8rem; padding: .35rem .75rem; border-radius: 6px;
}
.spotlight:hover .spotlight-cta { background: #1a4fb8; }

/* ── Fresh Marketplace Activity ticker ───────────────────── */
.activity {
    background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
    padding: .7rem 1rem; display: flex; gap: 1.4rem; overflow-x: auto;
}
.activity-item { display: flex; align-items: center; gap: .5rem; white-space: nowrap; font-size: .85rem; }
.activity-item .dot { width: .55rem; height: .55rem; border-radius: 50%; flex: none; }
.activity-item .ago { color: var(--muted); font-size: .78rem; }
.live-dot { display: inline-flex; align-items: center; gap: .4rem; color: var(--green); font-weight: 600; font-size: .85rem; }
.live-dot::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--green); }

/* ── How it works: numbered steps ────────────────────────── */
.how .steps { list-style: none; padding-left: 0; counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.how .steps li { counter-increment: step; padding-left: 0; display: flex; flex-direction: column; gap: .35rem; }
.how .steps li::before {
    content: counter(step); width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center;
}

/* ── richer footer ───────────────────────────────────────── */
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand { color: #fff; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.footer-brand b { color: var(--gold); }
.footer-verified { display: inline-flex; align-items: center; gap: .5rem; color: #8EE3B6; font-weight: 600; font-size: .9rem; }
.footer-verified::before { content: "✔"; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: rgba(23,138,85,.25); font-size: .75rem; }
.footer-links a { color: #A9BEDF; text-decoration: none; margin-right: 1rem; font-size: .9rem; }
.footer-links a:hover { color: #fff; }

/* ── responsive trims for the new bands ──────────────────── */
@media (max-width: 760px) {
    .shell { width: 100%; }
    .band-head { flex-direction: column; align-items: flex-start; gap: .4rem; }
    .spotlight-body { max-width: 80%; }
    .hero-stats { gap: 1rem; }
}

/* ══════════════════════════════════════════════════════════════════════════════════════════
   REFINEMENTS — masthead search, centred categories, and a product-style listing tile with the
   badge laid over the picture. Overrides the card block above where noted.
   ══════════════════════════════════════════════════════════════════════════════════════════ */

/* ── masthead search + seller CTAs ───────────────────────── */
.masthead-nav { margin-right: 1.2rem; }   /* was auto; the search now takes the slack */
.masthead-search { flex: 1 1 22rem; min-width: 12rem; display: flex; }
.masthead-search input {
    flex: 1; min-width: 0; border: 1px solid var(--rule); border-right: 0;
    border-radius: 7px 0 0 7px; padding: .5rem .8rem; font-size: .92rem; background: var(--ground);
}
.masthead-search input:focus-visible { outline: none; border-color: var(--blue); background: #fff; }
.masthead-search button {
    border: 0; background: var(--blue); color: #fff; padding: 0 .9rem;
    border-radius: 0 7px 7px 0; cursor: pointer; font-size: 1rem;
}
.masthead-search button:hover { background: #1a4fb8; }
.masthead-search button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #1a4fb8; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #126f44; }

/* ── centred category strip ──────────────────────────────── */
.category-strip { justify-content: center; }   /* centres when they fit; still scrolls when they don't */

/* ── refine bar (the old search box is gone; this just filters) ── */
.finder-label { font-weight: 700; color: var(--ink); font-size: .9rem; margin-right: .2rem; }

/* ── listing tile v2: image-led, badge over the picture ──── */
.card { padding: 0; gap: 0; overflow: hidden; }                    /* override: thumb bleeds to the edges */
.card-thumb { position: relative; margin: 0; border-radius: 0; background: var(--ground); }
.card-thumb img { aspect-ratio: 16 / 11; }                         /* a touch taller, product-forward */
.card-thumb-empty {
    display: grid; place-items: center; aspect-ratio: 16 / 11;
    font-size: 2.4rem; color: #C3CEDF; background: var(--ground);
}
.badge-overlay {
    position: absolute; top: .55rem; left: .55rem; z-index: 2; pointer-events: none;
    box-shadow: 0 1px 4px rgba(16,34,64,.18);
}

.card-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1 1 auto; }
.card-body h3 { font-size: 1.02rem; line-height: 1.25; }
.card-seller { margin: 0; color: var(--muted); font-size: .82rem; }
.card-lines { list-style: none; margin: .15rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .86rem; color: var(--body); }
.card-lines li { display: flex; align-items: center; gap: .45rem; }
.card-lines .line-ico { opacity: .85; font-size: .9rem; }

/* The foot keeps the row layout from the block above; drop the divider and tighten the spacing. */
.card-body .card-foot { margin-top: auto; padding-top: .7rem; border-top: 0; }

@media (max-width: 860px) {
    .masthead-search { order: 4; flex-basis: 100%; margin-top: .4rem; }
    .masthead-nav { margin-right: 0; }
}

/* ══════════════════════════════════════════════════════════════════════════════════════════
   CATEGORY RIBBON v2 — real categories with a live count badge, plus the sort/priced/region
   filters folded onto the ribbon (the separate refine bar is gone).
   ══════════════════════════════════════════════════════════════════════════════════════════ */

.category-bar { display: flex; flex-direction: column; gap: .8rem; padding: 1rem 1.5rem; }
.category-strip { padding: .3rem 0 0; }   /* the bar owns the outer padding now */

/* Tile: icon, name, and a count badge. More specific than the old `.category span` so the name
   and count are not blown up to the icon's size. */
.category { position: relative; min-width: 5.6rem; gap: .25rem; padding-top: .95rem; }
.category.is-active { border-color: var(--blue); background: #EEF4FF; color: var(--blue); }
.category .cat-ico { font-size: 1.3rem; line-height: 1; }
.category .cat-name { font-size: .78rem; font-weight: 600; line-height: 1.15; }
/* The count sits as a badge in the tile's top-right corner. Kept inside the tile bounds so the
   strip's horizontal scroll never clips it. */
.category .cat-count {
    position: absolute; top: .3rem; right: .3rem;
    font-size: .62rem; font-weight: 800; letter-spacing: .02em; line-height: 1;
    background: var(--blue); color: #fff; border-radius: 999px;
    padding: .12rem .38rem; min-width: 1.1rem; text-align: center;
    box-shadow: 0 1px 2px rgba(16,34,64,.18);
}
.category .cat-count.is-zero { background: var(--ground); color: var(--muted); border: 1px solid var(--rule); box-shadow: none; }

/* The filter row under the categories. */
.category-filters {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: .6rem 1.1rem; padding-top: .8rem; border-top: 1px solid var(--rule);
}
.cf-field { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); }
.cf-label { font-weight: 600; }
.cf-field select, .cf-region {
    border: 1px solid var(--rule); border-radius: 6px; padding: .4rem .6rem;
    font-size: .85rem; background: #fff; color: var(--ink);
}
.cf-field select:focus-visible, .cf-region:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.cf-region { width: 8rem; }
.cf-check { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--body); cursor: pointer; }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }
.clear { margin-left: 0; text-decoration: none; font-size: .85rem; }
.clear:hover { text-decoration: underline; }

@media (max-width: 680px) {
    .category-filters { justify-content: flex-start; }
}

/* ── Featured Deals: compact tiles ──
   Tiles are ~20% smaller than the earlier six-across layout (min track 12.5rem vs ~15.5rem), so
   more fit per row and the deals read denser. auto-fill (not auto-fit) holds the tile size rather
   than stretching a short set across the whole width. Scoped to the featured grid. */
.listings .grid { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }
@media (max-width: 560px) { .listings .grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Featured tile text: ~70% size, tighter line spacing (scoped to the featured grid) ── */
.listings .card-body { gap: .22rem; }
.listings .card-body h3 { font-size: .72rem; line-height: 1.12; }
.listings .card-seller { font-size: .57rem; line-height: 1.1; }
.listings .card-lines { font-size: .6rem; gap: .16rem; }
.listings .card-lines li { line-height: 1.1; }
.listings .card-lines .line-ico { font-size: .66rem; }
.listings .price { font-size: .8rem; }
.listings .price .unit { font-size: .56rem; }
.listings .msrp { font-size: .63rem; }
.listings .save-chip { font-size: .49rem; }
