/* ==========================================================================
   S.A.P. Ammunition — Visual Identity
   Tactical/rugged direction: gunmetal + ink for dark surfaces, warm bone
   for content backgrounds, brass as the one accent color (prices, primary
   buttons, active states), olive drab for secondary/outline elements.
   Corners are cut at an angle instead of rounded throughout.
   ========================================================================== */

/* Self-hosted Oswald + Inter (SIL OFL 1.1, see fonts/OFL-*.txt), Latin
   subset, variable weight. Replaces a Google Fonts @import: no render-
   blocking request chain, and no third-party request on every page. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(fonts/oswald-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Root Variables */
:root {
    --ink: #14161a;           /* darkest surface - header, nav, footer */
    --gunmetal: #2b2f33;      /* secondary dark surface */
    --olive: #565a3c;         /* secondary accent - outline buttons, borders */
    --olive-line: #6d7250;
    --brass: #b9862f;         /* primary accent - prices, CTAs, active states */
    --brass-bright: #d4a34e;  /* hover state for brass on dark surfaces */
    --bone: #ece6d6;          /* page background */
    --paper: #f6f2e7;         /* card / panel surface, slightly lighter than bone */
    --steel: #5c6055;         /* muted secondary text, dividers (5.8:1 on paper; was #7c8074 at 3.6:1) */
    --ink-soft: #34362f;      /* body text */
    --hairline: #d8d0ba;      /* borders on paper surfaces */
    --white: #ffffff;         /* raised panels (cards, posts, tables) */

    /* Text-safe variants (WCAG AA on paper/bone/white). --steel and --brass
       themselves stay for borders, icons and fills; text uses these. */
    --steel-on-dark: #9a9e91; /* secondary text on ink/gunmetal (6.6:1 on ink) */
    --brass-text: #8a5d14;    /* prices and brass-colored text (5.1:1 on paper) */
    --star: #a06f1c;          /* filled rating stars - graphic, 3.9:1 on paper */
    --link: #7a5518;          /* text links on light surfaces (6.0:1) */
    --chart: #8f6522;         /* data bars */

    /* Status colors - always paired with a text label, never color alone */
    --danger: #b3261e;
    --danger-bg: #f8d7da;
    --danger-ink: #721c24;
    --warn: #8a4b00;
    --warn-bg: #fff1d6;
    --ok: #1d6b35;
    --ok-bg: #d4edda;
    --ok-ink: #155724;
    --info: #1f4f82;
    --mark: #f3dca8;          /* search-hit highlight */

    /* Legacy aliases kept so any page-specific CSS that still references the
       old token names keeps working during the transition. */
    --primary-color: var(--ink);
    --secondary-color: var(--gunmetal);
    --accent-color: var(--brass);
    --text-color: var(--ink-soft);
    --light-color: var(--bone);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--ink-soft);
    background-color: var(--bone);
}

h1, h2, h3, h4 {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ink);
}

/* Section headings are H2 under each page's H1 (they were H3 before the page
   title became the H1). Zero specificity: keeps the old H3 size wherever a component rule doesn't set its own. */
:where(main h2) { font-size: 1.17em; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

/* Header and Navigation */
.title-bar {
    background-color: var(--ink);
    color: var(--bone);
    padding: 1rem;
    text-align: center;
    border-bottom: 4px solid var(--brass);
}

.title-bar .site-title {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 2rem;
    line-height: 1.2;
    margin: 0;
    color: var(--bone);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 4rem;
}

.menu-bar {
    background-color: var(--ink);
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
}

.menu-bar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.menu-bar a {
    font-family: 'Oswald', sans-serif;
    color: var(--bone);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.92rem;
    padding: 0.6rem 1rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.menu-bar a:hover {
    color: var(--brass-bright);
    border-color: var(--brass);
    background-color: transparent;
}

/* Main Content Area */
.content {
    background-color: var(--paper);
    padding: 2rem;
    border: 1px solid var(--hairline);
}

/* Picture Box (home page hero panel) */
.picture-box {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    text-align: center;
    overflow: hidden;
    background-color: var(--paper);
    border: 1px solid var(--hairline);
    border-top: 4px solid var(--brass);
}

.picture-box img {
    width: 100%;
    height: auto;
    max-width: 420px;
    display: block;
    margin: 0.5rem auto 1rem;
}

.intro-text {
    margin: 1rem auto 0;
    max-width: 600px;
    padding: 0 1rem;
    color: var(--ink-soft);
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
}

/* Home page hero video (replaces the static logo image) */
.hero-video-wrap {
    width: 100%;
    max-width: 420px;
    margin: 0.5rem auto 1rem;
    overflow: hidden;
    background-color: var(--ink);
}

.hero-video-wrap video {
    display: block;
    width: 100%;
    height: auto;
}

/* Shop-by-category quick links (home page) */
.category-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.category-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    background-color: var(--ink);
    color: var(--bone);
    border-top: 3px solid var(--brass);
    padding: 1.25rem 1rem;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.category-shortcut:hover {
    background-color: var(--gunmetal);
    transform: translateY(-3px);
}

.category-shortcut i {
    font-size: 1.6rem;
    color: var(--brass-bright);
}

.category-shortcut span {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

/* Products Grid */
.products-grid {
    display: grid;
    /* auto-fill (not auto-fit) so a category with one product doesn't
       stretch that card across the whole page */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.product-card {
    background: var(--paper);
    border: 1px solid var(--hairline);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    border-color: var(--brass);
    transform: translateY(-3px);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--hairline);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Parts & Accessories thumbnail is a bright white-background product photo
   that clashes with the darker, moody lifestyle photography on the other
   category cards. Warm/darken it slightly so it sits closer in tone. */
.parts-thumb {
    filter: sepia(18%) saturate(115%) brightness(90%) contrast(105%);
}

.product-info {
    padding: 1.5rem;
}

.product-info h2 {
    color: var(--ink);
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.product-info p {
    color: var(--steel);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    color: var(--brass-text);
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Buttons (Shop Now / Add to Cart / Checkout / CTA) share one look:
   brass fill, ink text, angled corner instead of rounded. */
.product-btn,
.add-to-cart-btn,
.checkout-btn,
.cta-button {
    display: inline-block;
    background-color: var(--brass);
    color: var(--ink);
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.92rem;
    text-decoration: none;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 96% 100%, 0 100%);
    transition: background-color 0.2s ease;
    width: 100%;
}

.checkout-btn,
.cta-button {
    width: auto;
}


.product-btn:hover,
.add-to-cart-btn:hover,
.checkout-btn:hover,
.cta-button:hover {
    background-color: var(--brass-bright);
}

/* Checkout's submit while the cart has something that can't go to the chosen state */
.product-btn:disabled,
.product-btn:disabled:hover { background-color: var(--hairline); color: var(--steel); cursor: not-allowed; }

/* Secondary / lower-emphasis buttons (Apply Coupon, Remove) */
button.remove,
#coupon-input + button {
    background-color: transparent;
    color: var(--olive);
    border: 2px solid var(--olive-line);
    padding: 0.6rem 1.1rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.85rem;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 96% 100%, 0 100%);
    transition: background-color 0.2s ease, color 0.2s ease;
}

button.remove:hover,
#coupon-input + button:hover {
    background-color: var(--olive);
    color: var(--bone);
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.lead-text {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--ink);
    margin-bottom: 2rem;
    text-align: left;
    border-left: 3px solid var(--brass);
    padding-left: 1rem;
}

.about-block {
    margin-bottom: 2.5rem;
}

.about-block h2 {
    color: var(--ink);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brass);
}

.about-block p {
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--ink-soft);
}

.features-list {
    list-style: none;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.features-list li {
    position: relative;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    color: var(--ink-soft);
}

.features-list li::before {
    content: "—";
    color: var(--brass);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 0.4rem;
}

/* Contact Page */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-top: 4px solid var(--brass);
    padding: 1.5rem;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-method:hover {
    transform: translateY(-3px);
    border-color: var(--brass);
}

.contact-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ink);
    color: var(--brass);
    font-size: 1.3rem;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 96% 100%, 0 100%);
}

.contact-method-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--steel);
}

.contact-value {
    overflow-wrap: anywhere;    /* the email address is wider than a 320px phone */
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
}

.contact-note {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--gunmetal);
    color: var(--bone);
    border-left: 4px solid var(--brass);
    font-size: 0.95rem;
}

/* Cart Styles */
.cart-icon {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
    /* a <button>: drop the browser's button look */
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--brass);
    color: var(--ink);
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.cart-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(20, 22, 26, 0.7);
}

.cart-modal-content {
    background-color: var(--paper);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--hairline);
    border-top: 4px solid var(--brass);
    width: 80%;
    max-width: 800px;
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.cart-modal-header h2 {
    font-size: 1.3rem;
}

.cart-modal-close {
    background: none;
    border: 0;
    padding: 0 0.25rem;
    line-height: 1;
    font-family: inherit;
    color: var(--steel);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.cart-modal-close:hover {
    color: var(--ink);
}

.cart-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cart-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
}

.cart-table th {
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--steel);
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid var(--hairline);
}

.cart-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--hairline);
    font-size: 0.92rem;
}

.cart-summary {
    margin-top: 1rem;
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
}

#coupon-input {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--hairline);
    font-size: 0.92rem;
    margin-top: 0.75rem;
    margin-right: 0.5rem;
    width: calc(100% - 130px);
}

.coupon-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--steel);
    min-height: 1.2em;
}

.cart-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.cart-summary .cart-total {
    font-weight: 700;
    border-top: 1px solid var(--hairline);
    margin-top: 0.3rem;
    padding-top: 0.6rem;
}
.cart-summary .small { display: block; color: var(--steel); padding-top: 0.5rem; }

/* "Loading", "Added to your cart", or what went wrong */
.cart-status { font-size: 0.92rem; color: var(--ok-ink); margin-bottom: 0.75rem; }
.cart-status:empty { display: none; }
.cart-status.is-error { color: var(--danger-ink); background: var(--danger-bg); border: 1px solid var(--danger); padding: 0.6rem 0.8rem; }
.cart-table .cart-line-total { font-weight: 600; }
.cart-table input { width: 4.5rem; padding: 0.4rem 0.5rem; border: 1px solid var(--hairline); background: var(--white); font: inherit; font-variant-numeric: tabular-nums; }
.cart-table .cart-remove-cell { text-align: right; }
.add-note { font-size: 0.88rem; margin-top: 0.5rem; color: var(--ok-ink); }
.add-note.is-error { color: var(--danger-ink); }
.add-note .link-btn { font-size: inherit; }

/* Phones: each line stacks - name on top, then qty / each / total / remove -
   instead of a 480px table scrolling sideways inside the dialog. */
@media (max-width: 600px) {
    .cart-table { min-width: 0; }
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table td { display: block; }
    .cart-table tr {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "name name name" "qty price total" "qty remove remove";
        align-items: center;
        gap: 0.2rem 1rem;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--hairline);
    }
    .cart-table td { border: 0; padding: 0; }
    .cart-table .cart-name { grid-area: name; font-weight: 600; }
    .cart-table .cart-qty { grid-area: qty; }
    .cart-table .cart-price { grid-area: price; color: var(--steel); }
    .cart-table .cart-price::before { content: "Each "; }
    .cart-table .cart-line-total { grid-area: total; text-align: right; }
    .cart-table .cart-remove-cell { grid-area: remove; }
    .cart-table .cart-qty input { width: 4.5rem; }
    .cart-actions .checkout-btn, .cart-actions .secondary-btn { width: 100%; text-align: center; }
}

/* Messages (semantic status colors - kept separate from the brand accent) */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.success-message {
    background-color: var(--ok-bg);
    color: var(--ok-ink);
    border: 1px solid var(--ok);
}

.error-message {
    background-color: var(--danger-bg);
    color: var(--danger-ink);
    border: 1px solid var(--danger);
}

/* Age Verification Overlay */
.age-verification-overlay {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 22, 26, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.age-verification-box {
    background-color: var(--paper);
    border-top: 4px solid var(--brass);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.age-verification-box h2 {
    color: var(--ink);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.age-verification-box p {
    font-family: 'Inter', sans-serif;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--ink-soft);
}

.age-verification-buttons {
    display: flex;
    gap: 1rem;
}

.age-verify-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.95rem;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 96% 100%, 0 100%);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.age-verify-yes {
    background-color: var(--brass);
    color: var(--ink);
    border: none;
}

.age-verify-yes:hover {
    background-color: var(--brass-bright);
}

.age-verify-no {
    background-color: transparent;
    color: var(--olive);
    border: 2px solid var(--olive-line);
}

.age-verify-no:hover {
    background-color: var(--olive);
    color: var(--bone);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .menu-bar ul {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .content {
        padding: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }

    .picture-box {
        margin: 1rem auto;
        padding: 1rem;
    }

    .contact-container,
    .contact-form,
    .about-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .picture-box {
        margin: 0.5rem auto;
        padding: 0.75rem;
    }

    .intro-text {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .cart-modal-content {
        width: 95%;
        margin: 5% auto;
    }

    #coupon-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .age-verification-buttons {
        flex-direction: column;
    }
}

/* ==========================================================================
   Accounts, checkout and admin (added with the database-backed store)
   ========================================================================== */

.small { font-size: 0.85rem; color: var(--steel); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* One-shot messages under the nav */
.flash {
    padding: 0.9rem 1.2rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--brass);
    background: var(--paper);
    color: var(--ink);
}
.flash-error { border-left-color: var(--danger); background: var(--danger-bg); color: var(--danger-ink); }
.flash-info  { border-left-color: var(--olive); }
.card-payment .pay-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1.25rem; margin: 0 0 1rem; }
.card-payment .pay-facts dt { color: var(--steel); }
.card-payment .pay-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.card-payment form { margin-bottom: 1rem; }
.pay-paid { color: var(--ok); }
.pay-held, .pay-unknown, .pay-pending { color: var(--warn); background: var(--warn-bg); }
.pay-refunded, .pay-voided, .pay-partially_refunded { color: var(--steel); }
.pay-declined { color: var(--danger); }

.notice {
    padding: 1rem 1.25rem;
    margin: 0 1rem 1rem;
    background: var(--gunmetal);
    color: var(--bone);
    border-left: 4px solid var(--brass);
    font-size: 0.95rem;
}


/* Product cards */
.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--gunmetal);
    color: var(--brass-bright);
    font-size: 3rem;
}
.product-quantity { margin-bottom: 1rem; }
.product-quantity input { width: 4.5rem; padding: 0.35rem 0.5rem; border: 1px solid var(--hairline); margin-left: 0.5rem; }
.sold-out-btn, .sold-out-btn:hover { background-color: var(--hairline); color: var(--steel); cursor: not-allowed; }
a.product-btn { display: block; }
.product-btn.inline, a.product-btn.inline { display: inline-block; width: auto; }

.cart-empty { padding: 0.5rem 0 0.25rem; }
.cart-empty p { color: var(--steel); margin-bottom: 1rem; }
a.checkout-btn { display: inline-block; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 1rem; max-width: 640px; }
.form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 500; color: var(--ink); font-size: 0.92rem; }
.form label small { font-weight: 400; color: var(--steel); }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="tel"],
.form input[type="number"], .form input[type="file"], .form select, .form textarea {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--hairline);
    background: var(--white);
    font: inherit;
    font-weight: 400;
    color: var(--ink-soft);
    width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; }
.form label.checkbox { flex-direction: row; align-items: flex-start; gap: 0.6rem; font-weight: 400; }
.form label.checkbox input { margin-top: 0.3rem; }
.form fieldset { border: 1px solid var(--hairline); padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.form legend { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.03em; padding: 0 0.4rem; color: var(--ink); }
.form fieldset.ffl { border-color: var(--brass); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row.three { grid-template-columns: 2fr 1fr 1fr; }

.auth-box { max-width: 460px; margin: 0 auto; }
.auth-box.wide { max-width: 640px; }
.auth-box .form { max-width: none; }
.auth-switch { margin-top: 1.25rem; }

.secondary-btn, .small-btn {
    display: inline-block;
    background: transparent;
    color: var(--olive);
    border: 2px solid var(--olive-line);
    padding: 0.6rem 1.1rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 96% 100%, 0 100%);
}
.small-btn { padding: 0.35rem 0.8rem; font-size: 0.78rem; }
.secondary-btn:hover, .small-btn:hover { background: var(--olive); color: var(--bone); }
.secondary-btn.danger { color: var(--danger); border-color: var(--danger); }
.secondary-btn.danger:hover { background: var(--danger); color: var(--white); }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th {
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--steel);
    text-align: left;
    padding: 0.5rem;
    border-bottom: 2px solid var(--hairline);
}
.data-table td { padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.data-table tfoot td { border-bottom: none; text-align: right; }
.data-table tfoot td:last-child { width: 1%; white-space: nowrap; }
.data-table tr.grand-total td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--hairline); }
.data-table.compact td, .data-table.compact th { padding: 0.35rem 0.5rem; }
.data-table tr.inactive td { opacity: 0.55; }
.data-table input[type="text"], .data-table input[type="number"] { width: 6.5rem; padding: 0.3rem 0.4rem; border: 1px solid var(--hairline); }
.data-table .thumb { width: 52px; }
.data-table .thumb img { width: 44px; height: 44px; object-fit: cover; display: block; }

.tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.05rem 0.4rem;
    background: var(--gunmetal);
    color: var(--bone);
    vertical-align: middle;
}
/* Status: text label always present; the color is only a second cue */
.status { font-weight: 600; font-size: 0.85rem; padding: 0.1rem 0.5rem; border: 1px solid currentColor; white-space: nowrap; }
.status-new       { color: var(--warn); background: var(--warn-bg); }
.status-contacted { color: var(--info); }
.status-paid      { color: var(--ok); }
.status-shipped   { color: var(--ok); }
.status-completed { color: var(--steel); }
.status-cancelled { color: var(--danger); text-decoration: line-through; }

/* Account / checkout / order */
.account-section, .admin-section { margin-bottom: 2.5rem; }
.account-section h2, .admin-section h2, .checkout-layout h2, .order-details h2 {
    font-size: 1.1rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--brass);
}
.admin-section h2 .small { text-transform: none; letter-spacing: 0; font-family: 'Inter', sans-serif; margin-left: 0.5rem; }
.checkout-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; margin-top: 1.25rem; }
.co-restricted { text-align: left; margin-top: 0.5rem; }
.field-note { font-size: 0.88rem; margin: -0.5rem 0 1rem; }
.field-note.is-error { color: var(--danger-ink); }
.co-restricted p { margin-bottom: 0.75rem; }
.co-restricted p:last-child { margin-bottom: 0; }
.checkout-layout .notice { margin: 1.25rem 0 0.75rem; }

/* Order page: where the order is. Stacked on phones, a row of steps on wider
   screens; done = brass check, next = brass outline, later = hairline. */
.order-steps { list-style: none; margin: 1.25rem 0 2rem; padding: 0; display: grid; gap: 0; }
.order-steps li { position: relative; display: grid; grid-template-columns: 1.75rem 1fr; align-content: start; gap: 0.85rem; padding-bottom: 1.1rem; }
.order-steps li:last-child { padding-bottom: 0; }
.order-steps li:not(:last-child)::after {           /* the line to the next step */
    content: ""; position: absolute; left: calc(0.875rem - 1px); top: 1.75rem; bottom: 0;
    width: 2px; background: var(--hairline);
}
.order-steps li.done:not(:last-child)::after { background: var(--brass); }
.order-steps .step-mark {
    width: 1.75rem; height: 1.75rem; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--hairline); background: var(--paper); color: var(--ink); font-size: 0.8rem;
}
.order-steps .done .step-mark { background: var(--brass); border-color: var(--brass); }
.order-steps .current .step-mark { border-color: var(--brass); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 8px var(--brass); }
.order-steps .step-text { display: flex; flex-direction: column; gap: 0.15rem; padding-top: 0.2rem; }
.order-steps .step-text strong { font-family: 'Oswald', 'Arial Narrow', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.95rem; }
.order-steps .todo .step-text strong { color: var(--steel); }
.order-steps .step-text .small { color: var(--ink-soft); }
@media (min-width: 760px) {
    .order-steps { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
    .order-steps li { grid-template-columns: 1fr; gap: 0.6rem; padding-bottom: 0; }
    .order-steps li:not(:last-child)::after { left: 2.25rem; right: -0.5rem; top: calc(0.875rem - 1px); bottom: auto; width: auto; height: 2px; }
    .order-steps .step-text { padding-top: 0; padding-right: 0.5rem; }
}
.checkout-summary .small { margin-top: 1rem; }
.order-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.logout-form { margin-top: 1rem; }

/* Admin */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 2px solid var(--hairline); margin-bottom: 1.5rem; }
.admin-tabs a {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.6rem 1rem;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.admin-tabs a.active { border-bottom-color: var(--brass); color: var(--ink); }
.admin-tabs .badge, .stat-tile.attention .stat-value { color: var(--warn); }
.admin-tabs .badge { background: var(--warn-bg); padding: 0 0.4rem; font-size: 0.8rem; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.5rem; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.admin-form { margin: 1.5rem 0; }
.admin-preview { max-width: 220px; max-height: 160px; border: 1px solid var(--hairline); }
.danger-zone { margin-top: 2rem; }

.filter-row, .search-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.filter-row a { padding: 0.3rem 0.7rem; border: 1px solid var(--hairline); color: var(--ink-soft); text-decoration: none; font-size: 0.88rem; }
.filter-row a.active { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.search-row input[type="search"] { flex: 1; min-width: 200px; padding: 0.5rem 0.7rem; border: 1px solid var(--hairline); }
.search-row select { padding: 0.5rem; border: 1px solid var(--hairline); }

.row-actions summary { cursor: pointer; font-size: 0.85rem; color: var(--olive); }
.row-actions form { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.row-actions input { width: 9rem; padding: 0.3rem; border: 1px solid var(--hairline); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-tile { background: var(--white); border: 1px solid var(--hairline); border-top: 3px solid var(--ink); padding: 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.stat-label { font-family: 'Oswald', sans-serif; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--steel); }
.stat-value { font-family: 'Oswald', sans-serif; font-size: 1.9rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.stat-sub { font-size: 0.82rem; color: var(--steel); }

/* Daily views bar chart: single series, so no legend - the heading names it.
   Bars use a darker brass than --brass so they clear 3:1 against the panel. */
.bar-chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 180px auto; gap: 0.25rem 0.5rem; }
.bar-chart-scale { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.75rem; color: var(--steel); text-align: right; }
.bar-chart-bars { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--steel); background: repeating-linear-gradient(to top, transparent 0 44px, var(--hairline) 44px 45px); }
.bar-slot { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; outline: none; }
.bar { width: 100%; background: var(--chart); border-radius: 4px 4px 0 0; min-height: 0; }
.bar-slot:hover .bar, .bar-slot:focus .bar { background: var(--ink); }
.bar-slot:hover::after, .bar-slot:focus::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: var(--ink);
    color: var(--bone);
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
    z-index: 5;
    pointer-events: none;
}
.bar-slot:first-child:hover::after, .bar-slot:first-child:focus::after { left: 0; transform: none; }
.bar-slot:last-child:hover::after, .bar-slot:last-child:focus::after { left: auto; right: 0; transform: none; }
.bar-chart-axis { grid-column: 2; display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--steel); }
.chart-table { margin-top: 0.75rem; font-size: 0.88rem; }
.chart-table summary { cursor: pointer; color: var(--olive); }
.chart-table table { max-width: 320px; margin-top: 0.5rem; }

@media (max-width: 768px) {
    .checkout-layout, .admin-columns, .form-row, .form-row.three { grid-template-columns: 1fr; }
}

/* Cart icon sits on the dark nav (previously an inline style="color: white") */
.cart-icon i { color: var(--bone); }
.cart-icon:hover i { color: var(--brass-bright); }

/* .product-info p sets steel; the price must win */
.product-info .product-price { color: var(--brass-text); font-size: 1.3rem; }

/* Text links inside content panels (buttons keep their own styling) */
.content a:not([class]), .content .small a, .flash a, .error-message a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.content a:not([class]):hover { color: var(--ink); }
.notice { margin: 0 0 1rem; }

/* Sign Up stands out in the nav for logged-out visitors */
.menu-bar a.nav-signup {
    background-color: var(--brass);
    color: var(--ink);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 94% 100%, 0 100%);
}
.menu-bar a.nav-signup:hover { background-color: var(--brass-bright); color: var(--ink); border-color: transparent; }
.section-heading { font-size: 1.1rem; margin-bottom: 0.9rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--brass); }
/* The general ".content a:not([class])" link style above must not reach the
   admin tab bar or the filter/pager chips - they have their own styling. */
.content .admin-tabs a, .content .filter-row a { text-decoration: none; color: var(--ink-soft); }
.content .admin-tabs a.active { color: var(--ink); }
.content .filter-row a.active { color: var(--bone); }

/* Admin > Categories */
.category-admin-row { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
.category-admin-photo img, .category-admin-photo .product-image-placeholder { width: 100%; height: 190px; object-fit: cover; border: 1px solid var(--hairline); }
@media (max-width: 768px) { .category-admin-row { grid-template-columns: 1fr; } }
.form .product-btn.inline { align-self: flex-start; }

/* White-background studio photos: show the whole item instead of cropping
   (photo-fit.js adds .fit-whole). The img's own white background fills the
   letterbox so it blends with the photo. */
.product-image img.fit-whole {
    object-fit: contain;
    background-color: var(--white);
    padding: 0.5rem;
}
.product-card:hover .product-image img.fit-whole { transform: scale(1.03); }

/* ==========================================================================
   Forum
   ========================================================================== */
.crumbs { font-size: 0.88rem; color: var(--steel); margin-bottom: 0.5rem; }
.forum-search { margin: 0; }
.forum-search input[type="search"] { min-width: 220px; }
.forum-rules { margin: 0 0 1.25rem; padding: 0.6rem 1rem; border: 1px solid var(--hairline); background: var(--white); font-size: 0.92rem; }
.forum-rules summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.forum-rules ul { margin: 0.6rem 0 0.4rem 1.2rem; }
.forum-list { border: 1px solid var(--hairline); background: var(--white); }
.forum-row { display: flex; gap: 1rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--hairline); align-items: flex-start; }
.forum-row:last-child { border-bottom: none; }
.forum-row:hover { background: var(--paper); }
.forum-row.gone { opacity: 0.55; }
.forum-row-main { flex: 1; min-width: 0; }
.forum-row-meta { text-align: right; white-space: nowrap; font-size: 0.9rem; color: var(--ink-soft); }
.content a.forum-title { font-weight: 600; font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.content a.forum-title:hover { color: var(--link); text-decoration: underline; }
.forum-section-row .forum-title { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.1rem; }
.forum-snippet { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.forum-snippet mark { background: var(--mark); color: inherit; padding: 0 1px; }
.forum-empty { padding: 1.5rem; text-align: center; color: var(--steel); border: 1px dashed var(--hairline); }
.tag-new   { background: var(--brass); color: var(--ink); }
.tag-staff { background: var(--olive); color: var(--bone); }
.tag-warn  { background: var(--danger); color: var(--white); }

.forum-thread-title { text-transform: none; }
.forum-admin-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.small-btn.danger { color: var(--danger); border-color: var(--danger); }
.small-btn.danger:hover { background: var(--danger); color: var(--white); }
.link-btn { background: none; border: none; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.85rem; }

.forum-posts { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.forum-post { background: var(--white); border: 1px solid var(--hairline); padding: 1rem 1.25rem; scroll-margin-top: 1rem; }
.forum-post.mine { border-left: 3px solid var(--brass); }
.forum-post:target { outline: 2px solid var(--brass); }
.forum-post-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; margin-bottom: 0.6rem; }
.forum-post-actions { margin-left: auto; display: flex; gap: 0.75rem; align-items: baseline; }
.forum-post-body { overflow-wrap: anywhere; line-height: 1.65; }
.forum-photos { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.9rem; }
.forum-photos img { display: block; max-width: 100%; height: auto; border: 1px solid var(--hairline); }  /* width/height set by forumPhotoImg() */
.report summary { cursor: pointer; color: var(--steel); list-style: none; }
.report[open] summary { color: var(--ink); }
.report-form { display: flex; gap: 0.4rem; margin-top: 0.4rem; }
.report-form input { width: 16rem; padding: 0.3rem 0.5rem; border: 1px solid var(--hairline); }
.forum-reply h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.forum-form { max-width: none; }
.form-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

.report-card { background: var(--white); border: 1px solid var(--hairline); border-left: 4px solid var(--danger); padding: 1rem; margin-bottom: 1rem; }
.report-card blockquote { margin: 0.5rem 0; padding: 0.5rem 0.75rem; background: var(--paper); border-left: 3px solid var(--hairline); }

@media (max-width: 600px) {
    .forum-row { flex-direction: column; gap: 0.3rem; }
    .forum-row-meta { text-align: left; }
    .forum-post-actions { margin-left: 0; width: 100%; }
    .report-form { flex-direction: column; }
    .report-form input { width: 100%; }
}
.content .notice a { color: var(--brass-bright); }
.content .notice a:hover { color: var(--bone); }

/* "12 available" / "Only 3 left!" under the price (shop.php) */
.product-info .stock-note { margin: -0.5rem 0 1rem; font-size: 0.88rem; color: var(--olive); font-weight: 600; }
.product-info .stock-note.low { color: var(--warn); }

/* ==========================================================================
   Product page and reviews
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Stars: grey ★★★★★ with a brass copy on top, clipped to the rating. Plain
   characters, so no icon font is needed and fractions (4.3) render exactly. */
.stars { position: relative; display: inline-block; font-size: 1rem; line-height: 1; letter-spacing: 1px; color: var(--hairline); vertical-align: -1px; }
.stars::before { content: "\2605\2605\2605\2605\2605"; }
.stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--star); }
.stars-fill::before { content: "\2605\2605\2605\2605\2605"; }
.stars-lg { font-size: 1.6rem; }
.rating-summary { margin: -0.25rem 0 0.6rem; }
.content .rating-summary a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.content .rating-summary a:hover { color: var(--ink); }
.rating-none { color: var(--steel); font-style: italic; }

.content a.product-name-link { color: var(--ink); text-decoration: none; }
.content a.product-name-link:hover { color: var(--link); text-decoration: underline; }

.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; margin-bottom: 2.5rem; }
.product-detail-image { height: auto; aspect-ratio: 4 / 3; border: 1px solid var(--hairline); background: var(--white); }
.product-detail-image a { display: block; height: 100%; }
.product-detail-info { padding: 0; }
.product-detail-info .page-title { text-transform: none; margin-bottom: 0.5rem; }
.product-detail-info .product-price { font-size: 1.8rem; }
.product-description { color: var(--ink-soft); line-height: 1.7; margin-bottom: 1.25rem; }
.product-detail-info .product-buttons { max-width: 320px; }

.reviews { border-top: 2px solid var(--brass); padding-top: 1.5rem; }
.reviews > h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.review-summary { display: flex; gap: 2.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.review-average { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.review-average-number { font-family: 'Oswald', sans-serif; font-size: 2.6rem; font-weight: 600; color: var(--ink); line-height: 1; }
.review-dist { border-collapse: collapse; font-size: 0.88rem; }
.review-dist td { padding: 0.15rem 0.5rem; white-space: nowrap; }
.review-dist-bar { width: 220px; }
.review-dist-bar span { display: block; height: 10px; background: var(--chart); min-width: 0; border-radius: 0 3px 3px 0; }
.review-dist-bar { background: linear-gradient(var(--hairline), var(--hairline)) center / 100% 10px no-repeat; }

.review-form-wrap { margin: 1rem 0 2rem; padding: 1rem 1.25rem; border: 1px solid var(--hairline); background: var(--white); }
.review-form-wrap summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.review-form { margin-top: 1rem; max-width: 640px; }

/* Star picker: radios in reverse order so "this star and everything left of
   it" can light up with sibling selectors - no JavaScript. */
.form fieldset.star-input { border: none; padding: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; flex-wrap: wrap; gap: 0.15rem; }
.form fieldset.star-input legend { width: 100%; padding: 0; margin-bottom: 0.3rem; font-family: 'Inter', sans-serif; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.92rem; color: var(--ink); }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.form fieldset.star-input label { display: block; font-size: 2rem; line-height: 1; color: var(--hairline); cursor: pointer; }
.form fieldset.star-input label:hover, .form fieldset.star-input label:hover ~ label,
.form fieldset.star-input input:checked ~ label { color: var(--brass); }
.star-input input:focus-visible + label { outline: 2px solid var(--brass); outline-offset: 2px; }

.review-list { display: flex; flex-direction: column; gap: 1rem; }
.review { background: var(--white); border: 1px solid var(--hairline); padding: 1rem 1.25rem; }
.review.mine { border-left: 3px solid var(--brass); }
.review header { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.review .small { margin: 0.3rem 0 0; }
.review-body { margin-top: 0.6rem; line-height: 1.6; overflow-wrap: anywhere; }
.tag-verified { background: var(--ok); color: var(--white); }
.review-admin.inactive { opacity: 0.6; }

@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; }
    .review-dist-bar { width: 140px; }
}
.row-actions form.remove-user { flex-wrap: wrap; align-items: center; border-top: 1px solid var(--hairline); padding-top: 0.5rem; }
.row-actions form.remove-user label { display: flex; gap: 0.3rem; align-items: center; }
.ship-restricted { color: var(--warn); margin: -0.25rem 0 1rem; }
.product-info .ship-restricted { color: var(--warn); }

/* The hidden attribute must win over component display rules (.form fieldset
   and .form label are display:flex), or JS-hidden fields stay visible. */
[hidden] { display: none !important; }

/* ==========================================================================
   Site footer (every page), nav search, phone menu
   ========================================================================== */
.site-footer { background: var(--ink); color: var(--bone); text-align: left; padding: 1.75rem 1rem 1rem; margin-top: 2rem; font-size: 0.9rem; }
.site-footer a { color: var(--brass-bright); text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--bone); text-decoration: underline; }
.footer-cols { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; line-height: 1.7; }
.footer-cols nav { display: flex; flex-direction: column; gap: 0.15rem; }
.footer-legal { max-width: 1200px; margin: 1.25rem auto 0; padding-top: 0.75rem; border-top: 1px solid var(--gunmetal); color: var(--steel-on-dark); font-size: 0.8rem; }
.container { padding-bottom: 0; }

.nav-search form { display: flex; align-items: center; background: var(--gunmetal); border: 1px solid var(--steel-on-dark); }
.nav-search input { background: transparent; border: none; color: var(--bone); padding: 0.4rem 0.6rem; width: 11rem; font: inherit; font-size: 0.88rem; }
.nav-search input::placeholder { color: var(--steel-on-dark); }
.nav-search input:focus { outline: none; }
.nav-search form:focus-within { border-color: var(--brass); outline: 2px solid var(--brass); outline-offset: 2px; }
.nav-search button { background: none; border: none; color: var(--bone); padding: 0.4rem 0.6rem; cursor: pointer; }
.nav-search button:hover { color: var(--brass-bright); }

.menu-bar-mobile { display: none; }
.menu-toggle { background: none; border: 1px solid var(--steel-on-dark); color: var(--bone); font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.45rem 0.9rem; cursor: pointer; font-size: 0.95rem; }
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { border-color: var(--brass); color: var(--brass-bright); }

@media (max-width: 768px) {
    .menu-bar-mobile { display: flex; justify-content: space-between; align-items: center; }
    .menu-bar-mobile .cart-icon { color: var(--bone); font-size: 1.15rem; padding: 0.4rem 0.8rem 0.4rem 0.4rem; }
    .menu-bar ul { display: none; margin-top: 0.75rem; }
    .menu-bar ul.open { display: flex; }
    .menu-bar ul li.nav-cart { display: none; }       /* already in the bar above */
    .nav-search, .nav-search form, .nav-search input { width: 100%; }
    .footer-cols { flex-direction: column; gap: 1rem; }
}
.product-info .card-category { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; color: var(--olive); margin: 0 0 0.25rem; }
.page-search { max-width: 640px; margin-bottom: 1.25rem; }
.order-updates ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.order-updates li { padding: 0.5rem 0; border-bottom: 1px solid var(--hairline); }
.ready-form { border-top: 2px solid var(--brass); padding-top: 1rem; }
.legal-page .features-list li { padding-left: 1.5rem; }
.legal-page h2 { font-size: 1.15rem; }

/* Reduced motion: hover lifts and zooms move the page under the pointer, so
   they go; the color/border changes that carry the hover state stay. The
   home video doesn't autoplay (nav.js). Targeted, not a global
   animation-kill, so useful feedback (focus rings, cart badge) is kept. */
@media (prefers-reduced-motion: reduce) {
    .product-card:hover,
    .category-shortcut:hover,
    .contact-method:hover,
    .product-card:hover .product-image img,
    .product-card:hover .product-image img.fit-whole { transform: none; }
    .product-card, .category-shortcut, .contact-method, .product-image img { transition-property: background-color, border-color, color; }
}

/* Touch screens: every control gets a 44px tap target (WCAG 2.5.5 / Apple &
   Android guidance). Desktop pointers keep the compact sizes. */
@media (pointer: coarse), (max-width: 768px) {
    .product-quantity input,
    .data-table input[type="text"],
    .data-table input[type="number"],
    .cart-table input { min-height: 44px; font-size: 1rem; }
    .product-quantity { display: flex; align-items: center; }

    /* Titles that are links: grow the tap area without moving the text */
    .content a.product-name-link,
    .content a.forum-title { display: inline-block; padding: 0.55rem 0; margin: -0.55rem 0; }

    .menu-toggle { min-height: 44px; }
    .menu-bar-mobile .cart-icon { min-width: 44px; min-height: 44px; justify-content: center; }
    .menu-bar ul a { display: inline-block; padding-top: 0.75rem; padding-bottom: 0.75rem; }
    .nav-search input, .nav-search button { min-height: 44px; }
    .nav-search button { min-width: 44px; }

    .footer-cols nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
    .site-footer a[href^="tel:"], .site-footer a[href^="mailto:"] { display: inline-flex; align-items: center; min-height: 44px; }

    .small-btn, .secondary-btn, .search-row button, .search-row input, .search-row select { min-height: 44px; }
    .link-btn { min-height: 44px; }
    .filter-row a, .stat-sub a { display: inline-flex; align-items: center; min-height: 44px; }
    .data-table input[type="checkbox"] { width: 1.5rem; height: 1.5rem; }
    .forum-rules summary, .row-actions summary, .chart-table summary, .review-form-wrap summary, .report summary { padding: 0.65rem 0; }
    .crumbs a { display: inline-block; padding: 0.55rem 0; }

    .form label.checkbox { min-height: 44px; align-items: center; }
    .form label.checkbox input { width: 22px; height: 22px; margin-top: 0; flex-shrink: 0; }
    .cart-modal-close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

/* The page title is each page's H1 (was an H2 under a site-name H1); keep
   its previous size. */
h1.page-title { font-size: 1.5rem; }

/* Browser surfaces in the house palette */
::selection { background: var(--brass-bright); color: var(--ink); }
input, textarea, select { caret-color: var(--brass-text); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brass-text); }
a { text-underline-offset: 2px; }
