/* ArcheryTech Solutions Store — storefront styles.
   Design system inherited from sdarchers: navy/yellow/cyan palette, Rift display over
   Roboto body text, pill buttons, warm sand/shell surfaces. Fonts are
   self-hosted (see assets/fonts/) rather than pulled from Google. */

/* ---------------------------------------------------------------------------
   Rift — display/title face. The shipped files report a flattened OS/2 weight
   class, so weight and style are declared explicitly here.
   --------------------------------------------------------------------------- */
@font-face {
    font-family: 'Rift';
    src: url('../fonts/rift-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rift';
    src: url('../fonts/rift-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rift';
    src: url('../fonts/rift-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rift';
    src: url('../fonts/rift-700-italic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* ---------------------------------------------------------------------------
   Roboto — body face. Variable font, one file per subset; latin-ext is only
   fetched when a page actually uses those glyphs. Licence in fonts/roboto-OFL.txt.
   --------------------------------------------------------------------------- */
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    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: 'Roboto';
    src: url('../fonts/roboto-latin.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    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: 'Roboto';
    src: url('../fonts/roboto-latin-ext.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto-latin-ext.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- TOKENS --- */
:root {
    /* Palette lifted from sdarchers */
    --navy: #00263E;
    --yellow: #F2A900;
    --cyan: #05C3DD;
    --red: #C63527;
    --dark-green: #00594C;
    --grey: #D7D2CB;
    /* Warm neutral surfaces — white cards need a warm ground or they read flat */
    --sand: #E8E5E0;
    --shell: #FAF9F8;
    --white: #FFFFFF;
    --ink-soft: #5b6b78;

    /* Availability palette — one hue per state, tuned against the navy/sand ground */
    --stock-in: #0f6b45;
    --stock-in-bg: #e2f3ea;
    --stock-low: #9a5b06;
    --stock-low-bg: #fdf0d9;
    --stock-out: #8b9199;
    --stock-out-bg: #eeecea;
    --stock-pre: #0b6d80;
    --stock-pre-bg: #ddf4f8;

    --font-display: 'Rift', 'Roboto Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Roboto', system-ui, -apple-system, sans-serif;

    /* Display sizes track the sdarchers 30/45/65 steps, fluid via clamp().
       The tight leading is the point — headline-to-body contrast reads editorial. */
    --display-sm: clamp(1.5rem, 1.15rem + 1.6vw, 1.875rem);
    --display: clamp(2rem, 1.4rem + 2.7vw, 2.8125rem);
    --display-lg: clamp(2.5rem, 1.5rem + 4.4vw, 4.0625rem);

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(0, 38, 62, 0.07), 0 4px 14px -6px rgba(0, 38, 62, 0.12);
    --shadow-md: 0 10px 28px -10px rgba(0, 38, 62, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
    font-family: var(--font-body);
    background-color: var(--shell);
    color: var(--navy);
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; }

h1, h2, h3, h4, .display { font-family: var(--font-display); line-height: 1; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* --- HEADER --- */
.header {
    background-color: var(--navy);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 14px rgba(0, 38, 62, 0.18);
    height: 66px;
    display: flex;
    align-items: center;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }

.logo a {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--yellow);
    font-family: var(--font-display); font-weight: 700;
    font-size: 1.4rem; letter-spacing: 0.02em; text-transform: uppercase;
    transition: color 0.25s ease;
}
.logo a:hover { color: var(--white); }
.logo a strong { font-weight: 700; color: var(--white); }
.logo a:hover strong { color: var(--yellow); }
.logo-image {
    /* Intrinsic 120x99 so the box is reserved before it loads; height drives
       the display size and width follows the 1.21:1 mark. 38px is the smallest
       size at which the circuit traces still resolve rather than turning to
       fuzz — below that the mark reads as a generic target. */
    height: 38px; width: auto;
}

.nav-menu { list-style: none; display: flex; align-items: center; gap: 2px; }
.nav-menu a {
    display: block;
    text-decoration: none; color: var(--white);
    font-family: var(--font-display); font-weight: 500;
    font-size: 1.02rem; letter-spacing: 0.03em; text-transform: uppercase;
    padding: 8px 13px; border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-menu a:hover { background-color: rgba(255, 255, 255, 0.12); color: var(--cyan); }
.nav-menu a.active { color: var(--navy); background-color: var(--yellow); font-weight: 700; }

/* Shop dropdown */
.has-dropdown { position: relative; }
.dropdown {
    position: absolute; top: 100%; left: 0;
    list-style: none; min-width: 230px;
    background: var(--white);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
    color: var(--navy); border-radius: 0; padding: 10px 20px;
    font-size: 0.95rem; text-transform: none; letter-spacing: 0;
    font-family: var(--font-body); font-weight: 500;
}
.dropdown a:hover { background: var(--sand); color: var(--dark-green); }

.nav-cart a { display: flex; align-items: center; gap: 7px; }
.cart-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; line-height: 1;
}
.cart-badge.has-items { background: var(--cyan); color: var(--navy); }

/* Always-visible cart on phones, sitting outside the collapsed menu */
.mobile-cart {
    display: none;
    position: relative;
    align-items: center; justify-content: center;
    width: 44px; height: 44px;
    margin-left: auto;
    color: var(--white); text-decoration: none;
    border-radius: 50%;
}
.mobile-cart:active { background: rgba(255, 255, 255, 0.12); }
.mobile-cart .cart-badge {
    position: absolute; top: -1px; right: -3px;
    min-width: 19px; height: 19px; padding: 0 5px;
    font-size: 0.7rem;
    border: 2px solid var(--navy);
}

.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm); cursor: pointer;
    width: 44px; height: 44px;
    align-items: center; justify-content: center; flex-direction: column;
}
.mobile-menu-toggle span {
    display: block; width: 24px; height: 2px; border-radius: 2px;
    background-color: var(--white); margin: 5px 0;
    transition: all 0.3s ease-in-out;
}
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- BUTTONS — pill shaped, Rift, per the sdarchers CTA language --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 12px 30px; border-radius: 999px;
    font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
    letter-spacing: 0.03em; text-transform: uppercase;
    text-decoration: none; cursor: pointer; border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
/* WCAG: navy text on cyan — white fails contrast against #05C3DD */
.btn-cyan { background-color: var(--cyan); color: var(--navy); }
.btn-cyan:hover { background-color: var(--navy); color: var(--white); transform: scale(1.04); }
.btn-navy { background-color: var(--navy); color: var(--white); }
.btn-navy:hover { background-color: var(--dark-green); color: var(--white); transform: scale(1.04); }
.btn-yellow { background-color: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background-color: var(--navy); color: var(--yellow); transform: scale(1.04); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); box-shadow: none; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-sm { min-height: 38px; padding: 8px 20px; font-size: 0.92rem; }
.btn-block { width: 100%; }

/* An in-flight or unavailable button must stop looking clickable — :hover still
   matches a disabled element, so hover styling is neutralised explicitly. */
.btn:disabled,
.btn.is-disabled,
.btn[aria-disabled="true"] {
    background: var(--grey); color: #6b7280; border-color: transparent;
    cursor: not-allowed; transform: none; box-shadow: none; opacity: 0.85;
}
.btn:disabled:hover,
.btn.is-disabled:hover,
.btn[aria-disabled="true"]:hover {
    background: var(--grey); color: #6b7280; transform: none;
}

/* --- SECTIONS --- */
.page-section { padding: 62px 0; }
.page-section.alt-bg { background-color: var(--sand); }

.section-title {
    font-family: var(--font-display); font-weight: 700;
    font-size: var(--display); line-height: 1;
    text-transform: uppercase; letter-spacing: 0.01em;
    color: var(--navy); text-align: center; margin-bottom: 14px;
}
.section-title::after {
    content: ''; display: block; width: 88px; height: 4px;
    background-color: var(--yellow); margin: 14px auto 0; border-radius: 2px;
}
.section-subtitle {
    text-align: center; font-size: 1.05rem; color: var(--ink-soft);
    margin: 0 auto 42px; max-width: 700px;
}

/* --- HERO --- */
.store-hero {
    background-image: linear-gradient(rgba(0, 38, 62, 0.88), rgba(0, 38, 62, 0.74)), url('../images/bg.webp');
    background-size: cover; background-position: center;
    color: var(--white);
    padding: 88px 0 78px;
}
.store-hero h1 {
    font-family: var(--font-display); font-weight: 700;
    font-size: var(--display-lg); line-height: 1;
    text-transform: uppercase; letter-spacing: 0.005em;
    margin-bottom: 20px;
}
.store-hero h1 em { font-style: italic; color: var(--yellow); }
.store-hero p { font-size: 1.15rem; max-width: 620px; margin-bottom: 30px; color: rgba(255, 255, 255, 0.92); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* --- CATEGORY TILES --- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.category-tile {
    display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
    background: linear-gradient(180deg, var(--white) 0%, var(--shell) 100%);
    border: 1px solid var(--grey);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.category-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--cyan); }

/* Fixed-ratio band so a row of tiles lines up whatever shape the uploads are,
   with the picture contained inside it rather than cropped to fit. min-height: 0
   matters: as a flex item this box would otherwise take its automatic minimum
   size from the image, leaving a different band height in every tile. */
.category-thumb {
    display: block; aspect-ratio: 16 / 10; flex-shrink: 0; min-height: 0;
    background: var(--sand); border-bottom: 1px solid var(--grey);
}
.category-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; display: block; }
/* Column so the product count can sit on the baseline of the tile whatever
   length the description runs to. */
.category-body { display: flex; flex-direction: column; flex-grow: 1; padding: 18px 20px 20px; }

.category-tile h3 {
    font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
    text-transform: uppercase; letter-spacing: 0.02em;
    color: var(--navy); margin-bottom: 8px;
}
.category-tile p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.55; flex-grow: 1; }
.category-tile .count {
    display: inline-block; margin-top: auto; padding-top: 14px;
    font-family: var(--font-display); font-size: 0.88rem; font-weight: 700;
    color: var(--dark-green); text-transform: uppercase; letter-spacing: 0.05em;
}

/* --- PRODUCT GRID & CARDS --- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }

.product-card {
    display: flex; flex-direction: column;
    background: var(--white);
    border: 1px solid var(--grey); border-radius: var(--radius);
    overflow: hidden; position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card.is-unavailable .product-thumb { opacity: 0.55; filter: saturate(0.4); }

/* The fixed box keeps every card in the grid the same height; `contain` shows
   the whole photograph inside it, letterboxed on the sand rather than
   centre-cropped, so nothing gets its limbs or riser cut off. */
.product-thumb {
    display: block; position: relative;
    aspect-ratio: 4 / 3; background: var(--sand);
    overflow: hidden;
}
.product-thumb img {
    width: 100%; height: 100%; display: block;
    object-fit: contain; padding: 10px;
}

.card-flags { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 2; }
.flag {
    padding: 4px 11px; border-radius: 999px;
    font-family: var(--font-display); font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.flag-sale { background: var(--red); color: var(--white); }
.flag-featured { background: var(--yellow); color: var(--navy); }

.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex-grow: 1; }
.product-cat {
    font-family: var(--font-display); font-size: 0.82rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); margin-bottom: 6px;
}
.product-title {
    font-family: var(--font-display); font-weight: 700;
    font-size: 1.25rem; line-height: 1.05; letter-spacing: 0.01em;
    text-transform: uppercase; margin-bottom: 10px;
}
.product-title a { color: var(--navy); text-decoration: none; }
.product-title a:hover { color: var(--dark-green); }
.product-blurb { font-size: 0.87rem; color: var(--ink-soft); margin-bottom: 14px; flex-grow: 1; line-height: 1.55; }

.price-row { display: flex; align-items: baseline; gap: 9px; margin-bottom: 14px; }
.price { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--navy); }
.price-was { font-size: 0.92rem; color: var(--ink-soft); text-decoration: line-through; }

.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions form { flex: 1; }
.card-actions .btn { width: 100%; }

/* --- AVAILABILITY BADGES (the core signal) --- */
.stock-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 13px; border-radius: 999px;
    font-family: var(--font-display); font-size: 0.88rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.4;
    margin-bottom: 12px; width: fit-content;
}
.stock-badge::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}
.stock-badge.stock-in { background: var(--stock-in-bg); color: var(--stock-in); }
.stock-badge.stock-low { background: var(--stock-low-bg); color: var(--stock-low); }
.stock-badge.stock-out { background: var(--stock-out-bg); color: #4b5563; }
.stock-badge.stock-out::before { background: var(--stock-out); }
.stock-badge.stock-pre { background: var(--stock-pre-bg); color: var(--stock-pre); }
.stock-badge.stock-none { background: var(--stock-out-bg); color: #4b5563; }

.stock-badge-lg { font-size: 1.05rem; padding: 9px 18px; }

/* Ribbon over the image for sold-out items */
.sold-out-ribbon {
    position: absolute; inset: auto 0 0 0;
    background: rgba(0, 38, 62, 0.93); color: var(--white);
    text-align: center; padding: 8px 10px;
    font-family: var(--font-display); font-size: 0.88rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.09em;
    z-index: 2;
}

/* --- SHOP LAYOUT --- */
.shop-header {
    background: linear-gradient(rgba(0, 38, 62, 0.9), rgba(0, 38, 62, 0.78)), url('../images/bg.webp');
    background-size: cover; background-position: center;
    color: var(--white); padding: 56px 0;
}
.shop-header h1 {
    font-family: var(--font-display); font-weight: 700;
    font-size: var(--display); text-transform: uppercase; letter-spacing: 0.01em;
    margin-bottom: 10px;
}
.shop-header p { color: rgba(255, 255, 255, 0.88); max-width: 640px; }

.shop-layout { display: grid; grid-template-columns: 256px 1fr; gap: 34px; align-items: start; }

/* The filter panel is a <details> so it collapses on phones without JS being
   required for the markup to make sense. On desktop the summary is hidden and
   it simply reads as a sidebar. */
.filters-panel { min-width: 0; }
.filters-toggle { display: none; }
.filters-toggle::-webkit-details-marker { display: none; }
.filters-toggle::marker { content: ''; }

.shop-filters {
    background: var(--white); border: 1px solid var(--grey);
    border-radius: var(--radius); padding: 22px;
    box-shadow: var(--shadow-sm);
    position: sticky; top: 86px;
}
.filter-block { margin-bottom: 24px; }
.filter-block:last-child { margin-bottom: 0; }
.filter-block h3 {
    font-family: var(--font-display); font-size: 0.95rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--ink-soft); margin-bottom: 10px;
}
.filter-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.filter-list a {
    display: flex; justify-content: space-between; gap: 8px;
    padding: 8px 12px; border-radius: 999px;
    text-decoration: none; color: var(--navy); font-size: 0.92rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.filter-list a:hover { background: var(--sand); }
.filter-list a.is-active { background: var(--navy); color: var(--white); font-weight: 700; }
.filter-list a.is-active .filter-count { color: rgba(255, 255, 255, 0.78); }
.filter-count { color: var(--ink-soft); font-size: 0.85rem; }

.shop-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.shop-count { color: var(--ink-soft); font-size: 0.95rem; }
.shop-count strong {
    font-family: var(--font-display); font-size: 1.25rem; color: var(--navy);
}
.shop-search { display: flex; gap: 8px; }
.shop-search input, .shop-sort select {
    font: inherit; font-size: 0.92rem; padding: 10px 16px;
    border: 1px solid var(--grey); border-radius: 999px;
    background: var(--white); color: var(--navy);
}
.shop-search input:focus, .shop-sort select:focus {
    outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(5, 195, 221, 0.28);
}

.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--white); border: 1px solid var(--grey);
    border-radius: 999px; padding: 6px 15px; font-size: 0.86rem; color: var(--navy);
    text-decoration: none;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip .x { font-weight: 700; }

.empty-state { text-align: center; padding: 62px 20px; color: var(--ink-soft); }
.empty-state h3 {
    font-family: var(--font-display); font-size: var(--display-sm); font-weight: 700;
    text-transform: uppercase; color: var(--navy); margin-bottom: 12px;
}

.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 38px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 9px 16px; border-radius: 999px; border: 1px solid var(--grey);
    text-decoration: none; color: var(--navy); font-size: 0.92rem;
    font-family: var(--font-display); font-weight: 500;
}
.pagination a:hover { border-color: var(--cyan); background: var(--cyan); color: var(--navy); }
.pagination .current { background: var(--navy); color: var(--white); border-color: var(--navy); font-weight: 700; }

/* --- BREADCRUMBS --- */
.breadcrumbs { font-size: 0.86rem; color: var(--ink-soft); padding: 18px 0 0; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--dark-green); }
.breadcrumbs span { margin: 0 7px; }

/* --- PRODUCT DETAIL --- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; padding: 28px 0 10px; }
/* The detail image is the one a shopper actually inspects, so it takes its
   shape from the photograph instead of the other way round: no fixed ratio, no
   crop. `min-height` stops a small file collapsing the column and `max-height`
   stops a tall portrait shot pushing the buy box off the screen. */
.gallery-main {
    border: 1px solid var(--grey); border-radius: var(--radius);
    overflow: hidden; background: var(--sand); position: relative;
    box-shadow: var(--shadow-sm);
    display: grid; place-items: center;
    min-height: 300px; padding: 12px;
}
.gallery-main img {
    width: 100%; height: auto; max-height: 68vh;
    object-fit: contain; display: block;
}
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button {
    width: 74px; height: 62px; padding: 3px; cursor: pointer;
    border: 2px solid var(--grey); border-radius: var(--radius-sm); overflow: hidden;
    background: var(--sand);
}
.gallery-thumbs button.is-active { border-color: var(--cyan); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.detail-meta {
    font-family: var(--font-display); font-size: 0.92rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft);
}
.detail-title {
    font-family: var(--font-display); font-weight: 700;
    font-size: var(--display); line-height: 1;
    text-transform: uppercase; letter-spacing: 0.005em;
    color: var(--navy); margin: 10px 0 16px;
}
.detail-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.detail-price .price { font-size: 2.4rem; }
.save-pill {
    background: var(--red); color: var(--white);
    font-family: var(--font-display); font-size: 0.88rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 4px 13px; border-radius: 999px;
}
.detail-blurb { font-size: 1.02rem; color: var(--navy); margin-bottom: 22px; line-height: 1.65; }

.buy-box {
    background: linear-gradient(180deg, var(--white) 0%, var(--shell) 100%);
    border: 1px solid var(--grey);
    border-radius: var(--radius); padding: 22px; margin-bottom: 26px;
    box-shadow: var(--shadow-sm);
}
.buy-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.qty-field {
    display: flex; align-items: center; border: 1px solid var(--grey);
    border-radius: 999px; background: var(--white); overflow: hidden;
}
.qty-field button {
    width: 42px; border: none; background: none; font-size: 1.25rem; cursor: pointer;
    color: var(--navy); line-height: 1;
}
.qty-field button:hover { background: var(--sand); color: var(--dark-green); }
.qty-field input {
    width: 54px; border: none; text-align: center; font: inherit; font-weight: 700;
    padding: 12px 0; color: var(--navy); -moz-appearance: textfield; background: transparent;
}
.qty-field input::-webkit-outer-spin-button,
.qty-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn { flex: 1; min-width: 190px; }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--grey); font-size: 0.94rem; }
.spec-table th {
    font-family: var(--font-display); font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--ink-soft); width: 40%;
}
.spec-table a { color: var(--dark-green); }

.detail-body { padding: 36px 0 0; max-width: 780px; }
.detail-body h2, .detail-body h3 {
    font-family: var(--font-display); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.01em;
    color: var(--navy); margin: 28px 0 12px;
}
.detail-body h2 { font-size: var(--display-sm); }
.detail-body h3 { font-size: 1.35rem; }
.detail-body p { margin-bottom: 15px; line-height: 1.7; }
.detail-body ul, .detail-body ol { margin: 0 0 15px 22px; }
.detail-body li { margin-bottom: 6px; }

/* Notify-me form for out-of-stock items */
.notify-box {
    border: 2px dashed var(--grey); background: var(--sand);
    border-radius: var(--radius); padding: 20px; margin-bottom: 26px;
}
.notify-box h3 {
    font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.02em;
    color: var(--navy); margin-bottom: 8px;
}
.notify-box p { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.6; }
.notify-form { display: flex; gap: 8px; flex-wrap: wrap; }
.notify-form input {
    flex: 1; min-width: 200px; font: inherit; font-size: 0.94rem; padding: 12px 18px;
    border: 1px solid var(--grey); border-radius: 999px; background: var(--white); color: var(--navy);
}
.notify-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(5, 195, 221, 0.28); }

/* --- CART & CHECKOUT --- */
.page-head { padding: 36px 0 12px; }
.page-head h1 {
    font-family: var(--font-display); font-weight: 700;
    font-size: var(--display); text-transform: uppercase; letter-spacing: 0.01em;
    color: var(--navy);
}
.page-head p { color: var(--ink-soft); margin-top: 8px; }

.cart-layout { display: grid; grid-template-columns: 1fr 348px; gap: 30px; align-items: start; padding-bottom: 62px; }

.cart-table {
    width: 100%; border-collapse: collapse; background: var(--white);
    border: 1px solid var(--grey); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cart-table th, .cart-table td { padding: 13px 14px; border-bottom: 1px solid var(--grey); text-align: left; vertical-align: middle; }
.cart-table th {
    font-family: var(--font-display); font-size: 0.84rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--ink-soft); background: var(--shell);
}
.cart-table tr:last-child td { border-bottom: none; }
.cart-table tr.is-unavailable { background: #fdf5f4; }

/* Money right-aligned on tabular figures so the column reads as a column, and
   the digits don't shift width as quantities change. */
.cart-table .col-num,
.cart-table td[data-label="Price"],
.cart-table td[data-label="Total"],
.cart-table td[data-label="Subtotal"] {
    text-align: right; font-variant-numeric: tabular-nums;
}
.cart-table .col-qty, .cart-table td[data-label="Qty"] { text-align: center; }

.cart-product { display: flex; gap: 12px; align-items: center; }
.cart-product img {
    width: 62px; height: 54px; object-fit: contain; padding: 3px; background: var(--sand);
    border-radius: var(--radius-sm); border: 1px solid var(--grey); flex-shrink: 0;
}
/* Deliberately the body face, not the Rift display face used on cards: a cart
   line is a list of things to read and check, and condensed uppercase costs
   both width and legibility at this size. Rift still owns the headings. */
.cart-product .name {
    font-weight: 700; font-size: 0.97rem; line-height: 1.35;
    color: var(--navy); text-decoration: none; display: block;
}
.cart-product .name:hover { color: var(--dark-green); }
.cart-product .stock-badge { margin-top: 5px; padding: 3px 10px; font-size: 0.8rem; }
.cart-product .stock-badge::before { width: 7px; height: 7px; }
.cart-qty-form { display: flex; gap: 6px; align-items: center; justify-content: center; }
.cart-qty-form input {
    width: 66px; padding: 9px; text-align: center; font: inherit; font-weight: 700;
    border: 1px solid var(--grey); border-radius: 999px; color: var(--navy);
}
.link-danger {
    background: none; border: none; color: var(--red); font: inherit; font-size: 0.86rem;
    cursor: pointer; padding: 0; text-decoration: underline;
}

.summary-card {
    background: var(--white); border: 1px solid var(--grey); border-radius: var(--radius);
    padding: 24px; position: sticky; top: 86px; box-shadow: var(--shadow-sm);
}
.summary-card h2 {
    font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.02em;
    color: var(--navy); margin-bottom: 16px;
}
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 0.95rem; }
.summary-row.total {
    border-top: 2px solid var(--navy); margin-top: 8px; padding-top: 14px;
    font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
    text-transform: uppercase; color: var(--navy);
}
.summary-note { font-size: 0.83rem; color: var(--ink-soft); margin-top: 14px; line-height: 1.55; }

.checkout-form {
    background: var(--white); border: 1px solid var(--grey);
    border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
    display: block; margin-bottom: 7px;
    font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--navy);
}
.form-group label .req { color: var(--red); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; font: inherit; font-size: 0.96rem; padding: 12px 18px;
    border: 1px solid var(--grey); border-radius: 999px;
    background: var(--white); color: var(--navy);
}
.form-group textarea { border-radius: var(--radius); resize: vertical; min-height: 110px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(5, 195, 221, 0.28);
}
.form-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 6px; }

.mini-items { list-style: none; margin-bottom: 14px; }
.mini-items li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--grey); font-size: 0.9rem; }
.mini-items li:last-child { border-bottom: none; }
.mini-items .qty { color: var(--ink-soft); }

/* --- ALERTS --- */
.alert { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.94rem; }
.alert-success { background: var(--stock-in-bg); color: var(--stock-in); border: 1px solid #b3ddc6; }
.alert-error { background: #fbeae8; color: #92251a; border: 1px solid #f0c6c1; }
.alert-warn { background: var(--stock-low-bg); color: var(--stock-low); border: 1px solid #eecfa0; }
.alert ul { margin: 6px 0 0 20px; }

/* --- CONFIRMATION --- */
.confirm-card {
    max-width: 720px; margin: 42px auto 72px;
    background: var(--white); border: 1px solid var(--grey); border-radius: var(--radius);
    padding: 42px; text-align: center; box-shadow: var(--shadow-md);
}
.confirm-icon {
    width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 50%;
    background: var(--cyan); color: var(--navy);
    display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700;
}
.confirm-card h1 {
    font-family: var(--font-display); font-weight: 700;
    font-size: var(--display-sm); text-transform: uppercase; letter-spacing: 0.01em;
    color: var(--navy); margin-bottom: 12px;
}
.ref-code {
    display: inline-block; margin: 18px 0 22px; padding: 12px 26px;
    background: var(--navy); color: var(--yellow); border-radius: 999px;
    font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
    letter-spacing: 0.09em;
}
/* Shown only when the receipt email didn't send — a caveat, not an error */
.confirm-note {
    margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm);
    background: var(--stock-low-bg); color: var(--stock-low);
    border: 1px solid #eecfa0; font-size: 0.9rem; line-height: 1.6;
}

/* --- CONTENT PAGES --- */
.content-page { max-width: 800px; margin: 0 auto; padding: 10px 0 62px; }
.content-page h2 {
    font-family: var(--font-display); font-weight: 700;
    font-size: var(--display-sm); text-transform: uppercase; letter-spacing: 0.01em;
    color: var(--navy); margin: 36px 0 12px;
}
.content-page h3 {
    font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
    text-transform: uppercase; color: var(--dark-green); margin: 24px 0 8px;
}
.content-page p, .content-page li { margin-bottom: 12px; line-height: 1.7; }
.content-page ul { margin-left: 22px; }

/* --- FOOTER --- */
.footer { background: var(--navy); color: rgba(255, 255, 255, 0.85); padding: 48px 0 0; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 34px; }
.footer-logo { height: 40px; width: auto; margin-bottom: 14px; }
.footer-col p { font-size: 0.9rem; line-height: 1.65; }
.footer-col h4 {
    color: var(--yellow); font-family: var(--font-display); font-weight: 700;
    font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: rgba(255, 255, 255, 0.82); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--cyan); }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.16); padding: 22px 20px; text-align: center; font-size: 0.87rem; }
.footer-note { font-size: 0.77rem; opacity: 0.62; margin-top: 6px; }

.back-to-top {
    position: fixed; bottom: 20px; right: 20px;
    width: 48px; height: 48px; border-radius: 50%;
    background-color: var(--cyan); color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 20px; font-weight: 700;
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* Toast for add-to-cart feedback */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
    background: var(--navy); color: var(--white);
    padding: 14px 24px; border-radius: 999px; box-shadow: var(--shadow-md);
    font-size: 0.93rem; font-weight: 500; z-index: 2000;
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    max-width: min(90vw, 440px); text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.is-error { background: var(--red); }

/* --- VARIANT PICKER --- */
.variant-picker { margin-bottom: 22px; display: grid; gap: 18px; }
.variant-group-head {
    display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.variant-group-label {
    font-family: var(--font-display); font-size: 0.95rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft);
}
.variant-chosen { font-size: 0.95rem; font-weight: 700; color: var(--navy); }

.swatch-row, .option-row { display: flex; flex-wrap: wrap; gap: 9px; }

.swatch {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 6px 15px 6px 7px;
    background: var(--white); border: 2px solid var(--grey); border-radius: 999px;
    font: inherit; font-size: 0.9rem; color: var(--navy); cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.swatch:hover { border-color: var(--navy); }
.swatch.is-active { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(5, 195, 221, 0.25); }
.swatch-dot {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    /* Inset ring keeps a white or very pale swatch visible on a white pill */
    box-shadow: inset 0 0 0 1px rgba(0, 38, 62, 0.22);
}
.swatch-name { font-weight: 600; }

.option-pill {
    min-height: 44px; padding: 10px 20px;
    background: var(--white); border: 2px solid var(--grey); border-radius: 999px;
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
    text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--navy); cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.option-pill:hover { border-color: var(--navy); }
.option-pill.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
/* Combination doesn't exist for the chosen colour — still clickable, since
   clicking it switches colour to one that has it. */
.option-pill.is-unavailable {
    opacity: 0.45;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.variant-sku {
    font-size: 0.82rem; color: var(--ink-soft);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.variant-sku:empty { display: none; }

/* Colour dots on a grid card */
.card-swatches { display: flex; align-items: center; gap: 5px; margin-bottom: 10px; }
.card-swatch {
    width: 15px; height: 15px; border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 38, 62, 0.22);
}
.card-swatch-more { font-size: 0.76rem; color: var(--ink-soft); font-weight: 600; }

.price-from {
    font-family: var(--font-display); font-size: 0.9rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft);
}

/* Variant label under a cart line */
.cart-variant {
    display: block; margin-top: 3px;
    font-size: 0.85rem; font-weight: 600; color: var(--dark-green);
}

/* --- STICKY MOBILE BUY BAR --- */
.mobile-buy-bar {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--grey);
    box-shadow: 0 -6px 20px -8px rgba(0, 38, 62, 0.3);
    transform: translateY(110%);
    transition: transform 0.25s ease;
}
.mobile-buy-bar.is-visible { transform: translateY(0); }
.mbb-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mbb-price { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--navy); line-height: 1; }
.mobile-buy-bar .stock-badge { margin: 0; padding: 2px 9px; font-size: 0.74rem; }
.mobile-buy-bar .btn { flex-shrink: 0; padding: 12px 24px; }

/* --- RESPONSIVE --- */
@media (max-width: 1000px) {
    .shop-layout { grid-template-columns: 1fr; gap: 18px; }
    .cart-layout { grid-template-columns: 1fr; }
    .summary-card { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }

    /* Filters become a tappable disclosure above the grid */
    .filters-toggle {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        min-height: 48px; padding: 12px 20px;
        background: var(--white); border: 1px solid var(--grey); border-radius: 999px;
        box-shadow: var(--shadow-sm);
        cursor: pointer; list-style: none;
        font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
        text-transform: uppercase; letter-spacing: 0.04em; color: var(--navy);
    }
    .filters-toggle-label { display: inline-flex; align-items: center; gap: 9px; }
    .filters-count {
        display: inline-flex; align-items: center; justify-content: center;
        min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
        background: var(--cyan); color: var(--navy); font-size: 0.78rem;
    }
    .filters-toggle-caret { transition: transform 0.2s ease; font-size: 0.9rem; }
    .filters-panel[open] .filters-toggle-caret { transform: rotate(180deg); }
    .filters-panel[open] .filters-toggle { border-radius: var(--radius) var(--radius) 0 0; }

    .shop-filters {
        position: static;
        border-top: none; border-radius: 0 0 var(--radius) var(--radius);
    }
}

@media (max-width: 880px) {
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 850px) {
    .nav-menu {
        display: none;
        position: absolute; top: 66px; left: 0; width: 100%;
        background-color: var(--navy);
        flex-direction: column; align-items: stretch;
        padding: 12px 0; box-shadow: 0 8px 16px rgba(0, 38, 62, 0.24);
        max-height: calc(100vh - 66px); overflow-y: auto;
    }
    .nav-menu.active-mobile { display: flex; }
    .nav-menu a { padding: 14px 22px; border-radius: 0; }
    .nav-menu a.active { background: rgba(242, 169, 0, 0.16); color: var(--yellow); }
    .nav-cart a { justify-content: flex-start; }
    .mobile-menu-toggle { display: block; }
    .dropdown {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; background: rgba(0, 0, 0, 0.2); border-radius: 0; padding: 0;
        display: none;
    }
    .has-dropdown.open .dropdown { display: block; }
    .dropdown a { color: rgba(255, 255, 255, 0.88); padding-left: 40px; }
    .dropdown a:hover { background: rgba(255, 255, 255, 0.1); color: var(--yellow); }
    .form-grid { grid-template-columns: 1fr; }
    /* Each cart line becomes a small card rather than one labelled block per
       cell: the product across the top, then price / qty / total / remove on a
       single row. The old stack ran to ~400px an item, so a four-item cart was
       three screens of scrolling before the summary came into view. */
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody { display: block; width: 100%; }
    /* `start` keeps the price/qty/total captions on one line, so the row still
       reads as a labelled header over its values even with the tall qty input
       in the middle of it. */
    .cart-table tr {
        display: grid; grid-template-columns: auto auto 1fr auto;
        align-items: start; gap: 10px 18px;
        border-bottom: 1px solid var(--grey); padding: 14px 16px;
    }
    .cart-table td { display: block; border-bottom: none; padding: 0; }
    .cart-table td[data-label="Product"], .cart-table td[data-label="Item"] { grid-column: 1 / -1; }

    /* The column headings are hidden, so each value carries its own caption —
       except the product cell, which needs no label to be understood, and the
       unlabelled remove cell. */
    .cart-table td[data-label]:not([data-label=""]):not([data-label="Product"]):not([data-label="Item"])::before {
        content: attr(data-label); display: block;
        font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.07em;
        color: var(--ink-soft); margin-bottom: 2px;
    }

    /* Values sit under their own caption, so the desktop right-alignment of the
       money columns would pull them away from it. */
    .cart-table td[data-label="Price"],
    .cart-table td[data-label="Total"],
    .cart-table td[data-label="Subtotal"],
    .cart-table td[data-label="Qty"] { text-align: left; }
    .cart-table .cart-qty-form { justify-content: flex-start; }
    /* Remove sits at the end of the value row, not up beside the captions */
    .cart-table td:last-child { justify-self: end; align-self: center; }
}

/* --- PHONES ---
   Tuned on a 390px viewport. The priorities here are: get product content above
   the fold, keep every control at a 44px tap target, and stop iOS zooming the
   page when a field is focused (which needs a >=16px font size on inputs). */
@media (max-width: 640px) {
    .container { padding: 0 16px; }

    .header { height: 60px; }
    .header-inner { gap: 10px; }
    .logo a { font-size: 1.1rem; gap: 8px; }
    .logo-image { height: 32px; }
    .mobile-cart { display: flex; }
    .mobile-menu-toggle { display: flex; }
    .nav-menu { top: 60px; max-height: calc(100vh - 60px); }
    /* The cart lives in the header bar on phones, so drop the duplicate row */
    .nav-menu .nav-cart { display: none; }

    /* Page headers were eating most of the first screen */
    .store-hero { padding: 42px 0 38px; }
    .store-hero p { font-size: 1.02rem; margin-bottom: 22px; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn { flex: 1 1 100%; }

    .shop-header { padding: 30px 0; }
    .shop-header p { font-size: 0.94rem; }
    .page-section { padding: 40px 0; }
    .page-head { padding: 24px 0 8px; }

    /* Breadcrumbs stay on one line and scroll rather than wrapping to three */
    .breadcrumbs {
        display: flex; align-items: center; gap: 0;
        white-space: nowrap; overflow-x: auto; padding: 14px 0 2px;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .breadcrumbs::-webkit-scrollbar { display: none; }
    .breadcrumbs a { padding: 6px 0; }

    /* Category tiles follow the same rule as the product cards: two per row,
       name and count only. One full-width tile per category turned the homepage
       into a long scroll before the shopper reached anything to buy. */
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .category-body { padding: 12px 12px 14px; }
    .category-tile h3 { font-size: 1.05rem; margin-bottom: 4px; }
    .category-tile p { display: none; }
    .category-tile .count { font-size: 0.8rem; padding-top: 8px; }

    /* Two columns of products, tightened so both fit comfortably */
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .product-body { padding: 12px 12px 14px; }
    .product-title { font-size: 1.05rem; }
    .product-cat { font-size: 0.74rem; }
    .product-blurb { display: none; } /* the card is a scan target, not a read */
    .price { font-size: 1.25rem; }
    .price-row { margin-bottom: 10px; }
    .stock-badge { font-size: 0.76rem; padding: 4px 10px; margin-bottom: 9px; }
    .card-actions .btn { padding: 10px 12px; font-size: 0.88rem; }

    /* Toolbar stacks: count, then a full-width search, then sort */
    .shop-toolbar { gap: 10px; margin-bottom: 16px; }
    .shop-search { width: 100%; }
    .shop-search input { flex: 1; min-width: 0; }
    .shop-sort { width: 100%; }
    .shop-sort select { width: 100%; min-height: 44px; }

    /* 44px minimum on everything tappable */
    .filter-list a { min-height: 44px; align-items: center; padding: 10px 14px; }
    .nav-menu a { min-height: 48px; display: flex; align-items: center; }
    .dropdown a { min-height: 44px; display: flex; align-items: center; }
    .chip { min-height: 38px; padding: 8px 16px; }
    .pagination a, .pagination span { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
    .link-danger { min-height: 44px; display: inline-flex; align-items: center; }
    .breadcrumbs a { min-height: 44px; display: inline-flex; align-items: center; }
    .spec-table a { min-height: 44px; display: inline-flex; align-items: center; }
    .logo a { min-height: 44px; }
    /* Footer link lists are the densest thing on the page — space them out so a
       thumb can't hit two at once */
    .footer-col li { margin-bottom: 2px; }
    .footer-col a { min-height: 44px; display: inline-flex; align-items: center; }
    /* The card image is already a large target; give the title one too */
    .product-title { margin-bottom: 8px; }
    .product-title a { display: block; min-height: 44px; }

    /* 16px+ on inputs so iOS doesn't zoom the viewport on focus */
    .form-group input, .form-group textarea, .form-group select,
    .shop-search input, .notify-form input, .cart-qty-form input, .qty-field input {
        font-size: 16px;
    }
    .form-group input, .form-group textarea, .form-group select { padding: 13px 18px; }

    /* Variant picker */
    .variant-picker { gap: 14px; margin-bottom: 18px; }
    .swatch { padding: 5px 13px 5px 6px; font-size: 0.86rem; }
    .swatch-dot { width: 24px; height: 24px; }
    .option-pill { padding: 10px 16px; font-size: 0.94rem; }

    /* Product detail */
    .gallery-main { min-height: 240px; }
    .gallery-main img { max-height: 60vh; }
    .detail-title { margin: 8px 0 12px; }
    .detail-price .price { font-size: 2rem; }
    .buy-box { padding: 16px; margin-bottom: 20px; }
    .buy-row { gap: 10px; }
    .buy-row .btn { min-width: 0; flex: 1 1 100%; }
    .qty-field { width: 100%; justify-content: space-between; }
    .qty-field button { width: 56px; height: 48px; }
    .qty-field input { flex: 1; }
    .detail-body { padding-top: 26px; }
    .notify-form input, .notify-form .btn { flex: 1 1 100%; }

    /* Give the sticky bar room so it never covers the last row of content.
       :not([hidden]) matters — the bar ships hidden and only JS reveals it, and
       a bare display:flex here would override the hidden attribute. */
    .mobile-buy-bar:not([hidden]) { display: flex; }
    body:has(.mobile-buy-bar:not([hidden])) .footer { padding-bottom: 74px; }
    body:has(.mobile-buy-bar:not([hidden])) .back-to-top { bottom: 84px; }
    .back-to-top { right: 14px; width: 44px; height: 44px; }

    /* Cart rows read as cards once the table collapses */
    .cart-table tr { padding: 13px 14px; gap: 10px 14px; }
    .cart-product { gap: 10px; }
    .cart-product img { width: 56px; height: 48px; }
    .cart-product .name { font-size: 0.95rem; }
    .summary-card, .checkout-form { padding: 18px; }
    .cart-layout { gap: 20px; padding-bottom: 40px; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 26px; }
    .footer { padding-top: 36px; }
    .confirm-card { padding: 26px 18px; margin: 26px auto 50px; }
    .ref-code { font-size: 1.1rem; padding: 10px 20px; letter-spacing: 0.06em; }

    .toast { left: 16px; right: 16px; transform: translateY(20px); max-width: none; }
    .toast.show { transform: translateY(0); }
}

/* Very narrow phones — one product per row rather than two cramped ones */
@media (max-width: 380px) {
    .product-grid { grid-template-columns: 1fr; }
    .product-blurb { display: block; }
    .logo a { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}
