/* ============================================================================
   Default theme

   A deliberately neutral storefront: white ground, near-black type, one accent
   colour. The only branding it carries is the store's logo, so a store that
   uploads a logo and nothing else still looks finished.

   Brand colours and fonts set in Settings → Appearance are injected as CSS
   custom properties by layout/theme.liquid and override the tokens below.
   ============================================================================ */

/* ── Tokens ───────────────────────────────────────────────── */
:root {
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-body: var(--font-system);
    --font-heading: var(--font-body);

    /* Overridden by style.color_* when the store sets them. */
    --brand: #191b1f;
    --brand-contrast: #ffffff;
    --brand-secondary: #4b5563;
    --brand-accent: #9a3412;

    --color-bg: #ffffff;
    --color-text: #191b1f;

    /*
       Greys are mixed from the background and text colours rather than hardcoded, so a store
       that sets a dark background in Settings → Appearance gets dark panels and borders to
       match instead of light-grey ones. The literal values are the fallback for browsers
       without color-mix() and are what the neutral defaults compute to anyway.
    */
    --color-muted: #6b7280;
    --color-muted: color-mix(in srgb, var(--color-text) 62%, var(--color-bg));
    --color-border: #e4e6ea;
    --color-border: color-mix(in srgb, var(--color-bg) 88%, var(--color-text));
    --color-surface: #f6f6f7;
    --color-surface: color-mix(in srgb, var(--color-bg) 96%, var(--color-text));
    --color-surface-strong: #ebecee;
    --color-surface-strong: color-mix(in srgb, var(--color-bg) 92%, var(--color-text));
    --color-success: #15803d;
    --color-danger: #dc2626;
    --color-warning: #b45309;

    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    --max-width: 1280px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --header-height: 72px;
    --section-gap: clamp(2.75rem, 6vw, 4.5rem);

    --shadow-sm: 0 1px 2px rgba(16, 17, 20, 0.06);
    --shadow-md: 0 10px 30px rgba(16, 17, 20, 0.10);
    --shadow-lg: 0 24px 60px rgba(16, 17, 20, 0.14);

    --transition: 160ms ease;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    letter-spacing: -0.015em;
    font-weight: 600;
}

a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus { left: 0; }

.icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.site-main { flex: 1; width: 100%; }

/*
   Every top-level block a template renders is centred and gutter-padded here,
   so templates only describe their content. Opting out is one class.
*/
.site-main > * {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.site-main > .full-bleed {
    max-width: none;
    padding-inline: 0;
}

.section { padding-block: var(--section-gap); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.section-heading {
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.section-subheading {
    color: var(--color-muted);
    margin-top: 0.35rem;
}

.section-link {
    color: var(--color-muted);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 2px;
    transition: color var(--transition), border-color var(--transition);
}

.section-link:hover { color: var(--color-text); border-color: currentColor; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn,
button[type="submit"],
.product-info button,
.not-found a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-primary,
button[type="submit"],
.product-info button,
.not-found a {
    background: var(--brand);
    color: var(--brand-contrast);
}

.btn-primary:hover,
button[type="submit"]:hover,
.product-info button:hover,
.not-found a:hover {
    background: #34383f;
    background: color-mix(in srgb, var(--brand) 84%, #ffffff);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover { background: var(--color-surface); border-color: var(--color-text); }

button:disabled,
button[type="submit"]:disabled,
.product-info button:disabled {
    background: var(--color-surface-strong);
    color: var(--color-muted);
    cursor: not-allowed;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-height);
}

.logo { display: flex; align-items: center; flex-shrink: 0; }

.logo-image {
    max-height: 44px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.site-nav { flex: 1; min-width: 0; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links > li { position: relative; }

.nav-links a {
    display: inline-block;
    padding: 0.5rem 0;
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--color-text);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), color var(--transition);
}

.nav-links > li > a:hover { border-color: currentColor; }

/* Category dropdown — opens on hover and on keyboard focus. */
.nav-submenu {
    position: absolute;
    top: 100%;
    left: -0.75rem;
    min-width: 200px;
    padding: 0.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav-item.has-children:hover .nav-submenu,
.nav-item.has-children:focus-within .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-submenu a {
    display: block;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    border-bottom: none;
    white-space: nowrap;
}

.nav-submenu a:hover { background: var(--color-surface); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.header-search input {
    width: 200px;
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    border: 1px solid transparent;
}

.header-search input:focus {
    background: var(--color-bg);
    border-color: var(--color-border);
}

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: var(--brand-contrast);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* ── Mobile navigation ────────────────────────────────────── */
.nav-drawer { display: none; }

.nav-toggle {
    display: flex;
    align-items: center;
    padding: 0.4rem;
    cursor: pointer;
    list-style: none;
    border-radius: var(--radius-sm);
}

.nav-toggle::-webkit-details-marker { display: none; }

.nav-drawer-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 90;
    padding: 1.25rem var(--gutter) 1.75rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.drawer-search { margin-bottom: 1.25rem; }

.drawer-search input {
    width: 100%;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    border: 1px solid transparent;
}

.drawer-links > li + li { border-top: 1px solid var(--color-border); }

.drawer-links a {
    display: block;
    padding: 0.8rem 0;
    font-size: 1rem;
    font-weight: 500;
}

.drawer-sublinks { padding: 0 0 0.5rem 1rem; }

.drawer-sublinks a {
    padding: 0.45rem 0;
    font-size: 0.925rem;
    font-weight: 400;
    color: var(--color-muted);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    margin-top: var(--section-gap);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    color: var(--color-text);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr));
    gap: 2.5rem;
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.footer-logo .logo-image { max-height: 40px; }

.footer-heading {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.footer-links li + li { margin-top: 0.5rem; }

.footer-links a {
    font-size: 0.925rem;
    color: var(--color-text);
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--color-muted); }

.footer-contact address {
    font-style: normal;
    font-size: 0.925rem;
    color: var(--color-text);
    white-space: pre-line;
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-block: 1.25rem;
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.hero-inner {
    max-width: var(--max-width);
    margin-inline: auto;
    padding: clamp(3.5rem, 10vw, 7rem) var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
}

.hero-left .hero-inner { align-items: flex-start; text-align: left; }

.hero-heading {
    font-size: clamp(2.1rem, 6vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    max-width: 18ch;
}

.hero-left .hero-heading { max-width: 22ch; }

.hero-subheading {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: var(--color-muted);
    max-width: 52ch;
}

.hero-button { margin-top: 0.75rem; }

.hero-has-image {
    background-size: cover;
    background-position: center;
    border-bottom: none;
}

.hero-has-image .hero-inner {
    position: relative;
    color: #fff;
    min-height: min(70vh, 560px);
    justify-content: center;
}

.hero-has-image .hero-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
}

.hero-has-image .hero-inner > * { position: relative; }
.hero-has-image .hero-subheading { color: rgba(255, 255, 255, 0.88); }

.hero-has-image .hero-button {
    background: #fff;
    color: #191b1f;
}

.hero-has-image .hero-button:hover { background: rgba(255, 255, 255, 0.88); }

/* ── Highlights ───────────────────────────────────────────── */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    padding-top: var(--section-gap);
    border-top: 1px solid var(--color-border);
}

.highlight-title {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.highlight-text {
    color: var(--color-muted);
    font-size: 0.95rem;
}

/* ── Product grid & cards ─────────────────────────────────── */
.products-grid { padding-block: var(--section-gap); }

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

.product-card a { display: block; }

.product-card-media {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.product-card:hover .product-card-media img { transform: scale(1.04); }

.product-card-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        var(--color-surface),
        var(--color-surface) 12px,
        var(--color-surface-strong) 12px,
        var(--color-surface-strong) 24px
    );
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-card-body { padding-top: 0.85rem; }

.product-card-brand {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.2rem;
}

.product-card h3 {
    font-size: 0.975rem;
    font-weight: 500;
    letter-spacing: 0;
}

.product-card .price {
    margin-top: 0.3rem;
    font-size: 0.95rem;
}

.price-was {
    color: var(--color-muted);
    text-decoration: line-through;
    margin-right: 0.45rem;
}

/* ── Product detail ───────────────────────────────────────── */
.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    padding-block: var(--section-gap);
    align-items: start;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
}

.product-info h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    margin-bottom: 0.4rem;
}

.product-info .brand {
    color: var(--color-muted);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.product-info .price {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.product-info .description {
    line-height: 1.75;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-buy { margin-bottom: 2rem; }

.product-description {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.product-description > h2 {
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
}

.product-info .variants,
.product-info [data-option-groups] { margin-bottom: 1.5rem; }

.product-info button { width: 100%; padding-block: 1rem; }

.option-group {
    border: none;
    margin-bottom: 1rem;
}

.option-group legend {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
}

.option-label input { width: auto; }

.option-price { color: var(--color-muted); font-size: 0.9rem; }

.required { color: var(--color-danger); }

/* Imported HTML descriptions */
.description h1, .description h2, .description h3,
.description h4, .description h5, .description h6 {
    margin: 1.5rem 0 0.5rem;
    line-height: 1.3;
}
.description h1 { font-size: 1.35rem; }
.description h2 { font-size: 1.2rem; }
.description h3 { font-size: 1.05rem; }
.description p { margin-bottom: 0.85rem; }
.description ul, .description ol { margin: 0.85rem 0; padding-left: 1.5rem; list-style: revert; }
.description li { margin-bottom: 0.3rem; }
.description a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

.description img {
    border-radius: var(--radius);
    margin: 1.25rem 0;
}

.description table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.9rem;
}

.description th,
.description td {
    text-align: left;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--color-border);
}

.description th { background: var(--color-surface); font-weight: 600; }

.description blockquote {
    border-left: 2px solid var(--color-border);
    padding: 0.25rem 1rem;
    margin: 1.25rem 0;
    color: var(--color-muted);
}

.description pre, .description code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875em;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
}
.description pre { padding: 1rem; overflow-x: auto; margin: 1.25rem 0; }
.description code { padding: 0.15rem 0.35rem; }

.description hr { border: none; border-top: 1px solid var(--color-border); margin: 1.75rem 0; }

/* ── Image carousel ───────────────────────────────────────── */
/*
   A scroll-snap track, so swiping is the browser's own panning: momentum, rubber-banding and
   snapping all come for free, and it still works with the keyboard and a trackpad. The dots
   are the affordance, so the scrollbar itself is hidden.
*/
.carousel { position: relative; }

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-radius: var(--radius);
    background: var(--color-surface);
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    aspect-ratio: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/*
   Fixed-size dots that wrap rather than shrink: a product with twenty images would otherwise
   squeeze them into a dense strip of untappable slivers.
*/
.carousel-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.15rem;
    padding-top: 0.5rem;
}

/* The button is a touch target; the dot people see is drawn inside it. */
.carousel-dot {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
}

.carousel-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    border-radius: 50%;
    background: var(--color-border);
    transition: background var(--transition), transform var(--transition);
}

.carousel-dot.active::before {
    background: var(--color-text);
    transform: scale(1.3);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: background var(--transition);
}

.carousel-prev:hover,
.carousel-next:hover { background: var(--color-surface); }

.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }

.carousel-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    margin-top: 0.5rem;
}

.carousel-thumb {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    overflow: hidden;
    background: var(--color-surface);
    transition: border-color var(--transition);
}

.carousel-thumb.active { border-color: var(--color-text); }

.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Product attributes ───────────────────────────────────── */
.product-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin-bottom: 1.75rem;
    padding-block: 1.1rem;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.product-attribute { font-size: 0.9rem; }

.product-attribute-label {
    font-weight: 500;
    color: var(--color-muted);
    margin-right: 0.35rem;
}

/* ── Collections & listing pages ──────────────────────────── */
.collection,
.services-collection,
.search-page,
.blog-page,
.blog-post,
.cart-page,
.checkout-page,
.order-page,
.quote-page,
.booking-page,
.service-detail,
.cms-page { padding-block: var(--section-gap); }

.collection > h1,
.services-collection > h1,
.search-page > h1,
.blog-page > h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    margin-bottom: 2rem;
}

.collection-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.collection-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
}

.sidebar-title,
.filter-group-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-bottom: 0.85rem;
}

.category-nav li + li { margin-top: 0.15rem; }

.category-nav a {
    display: block;
    padding: 0.35rem 0.55rem;
    margin-left: -0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    transition: background var(--transition);
}

.category-nav a:hover { background: var(--color-surface); }
.category-nav a.active { font-weight: 600; background: var(--color-surface); }
.category-nav ul { padding-left: 0.85rem; }

/* ── Filters ──────────────────────────────────────────────── */
.filter-group { margin-bottom: 1.75rem; }

/* The value's own text inside a checkbox row — not a heading. */
.filter-label { font-weight: 400; }

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
}

.filter-option input[type="checkbox"] { width: auto; margin: 0; }

.filter-count { color: var(--color-muted); font-size: 0.8rem; }

.filter-sort {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.filter-submit {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
}

/* ── Cart ─────────────────────────────────────────────────── */
.cart-page h1,
.checkout-page h1,
.order-page h1,
.quote-page h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    margin-bottom: 2rem;
}

.cart-empty { color: var(--color-muted); font-size: 1.05rem; }

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

.cart-table th {
    text-align: left;
    padding: 0 1rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.cart-table th:first-child, .cart-table td:first-child { padding-left: 0; }
.cart-table th:last-child, .cart-table td:last-child { padding-right: 0; text-align: right; }

.cart-item-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
}

.cart-item-name { display: block; font-weight: 500; }

.cart-item-variant,
.cart-item-options,
.cart-item-option { display: block; color: var(--color-muted); font-size: 0.875rem; }

.cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 0.15rem;
}

.cart-qty span { min-width: 2ch; text-align: center; font-size: 0.9rem; }

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.cart-qty-btn:hover { background: var(--color-surface); }

.cart-remove {
    background: none;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.25rem;
    transition: color var(--transition);
}

.cart-remove:hover { color: var(--color-danger); }

.cart-footer {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
}

.cart-subtotal { font-size: 1.15rem; font-weight: 600; }

.cart-actions { display: flex; gap: 0.75rem; }

/* ── Checkout ─────────────────────────────────────────────── */
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: start;
}

.checkout-form-col h2,
.checkout-summary-col h2 {
    font-size: 1.1rem;
    margin: 2rem 0 1rem;
}

.checkout-form-col h2:first-child { margin-top: 0; }

.checkout-summary-col {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
}

.form-group .optional { color: var(--color-muted); font-weight: 400; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-delivery-method { margin-bottom: 1.5rem; }

.checkout-delivery-option,
.checkout-freight-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    cursor: pointer;
    margin-bottom: 0.5rem;
    font-weight: 400;
    transition: border-color var(--transition), background var(--transition);
}

.checkout-delivery-option:has(input:checked),
.checkout-freight-option:has(input:checked) {
    border-color: var(--color-text);
    background: var(--color-surface);
}

.checkout-delivery-option input,
.checkout-freight-option input { width: auto; margin: 0; }

.checkout-freight-option [data-freight-price] { margin-left: auto; font-weight: 600; }

.checkout-freight-loading { color: var(--color-muted); font-style: italic; }

.checkout-pickup-info {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    font-size: 0.9rem;
    white-space: pre-line;
}

.checkout-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    color: var(--color-danger);
    margin-bottom: 1rem;
}

.checkout-inline-message {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: 500;
}

.checkout-inline-message.is-error { color: var(--color-danger); }
.checkout-inline-message.is-success { color: var(--color-success); }

#checkout-discount-code {
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

#checkout-discount-code.is-valid {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
    background-color: #f0fdf4;
}

#checkout-discount-code.is-invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
    background-color: #fef2f2;
}

.checkout-submit { width: 100%; margin-top: 1.25rem; padding-block: 1rem; }

.checkout-payment {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
}

.checkout-payment h2 { margin-top: 0; margin-bottom: 1rem; }

#checkout-payment-element { min-height: 100px; }

.checkout-summary-table { width: 100%; border-collapse: collapse; }

.checkout-summary-item td {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.checkout-summary-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.checkout-item-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}

.checkout-summary-product small {
    display: block;
    color: var(--color-muted);
    font-size: 0.8rem;
}

/* Padding, not a gap: these are table cells, and on a phone they collide without it. */
.checkout-summary-qty { text-align: center; color: var(--color-muted); padding-inline: 0.75rem; white-space: nowrap; }
.checkout-summary-price { text-align: right; font-weight: 500; white-space: nowrap; }

.checkout-totals { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.3rem 0;
    font-size: 0.925rem;
}

.checkout-total-savings { color: var(--color-success); font-weight: 600; }

.checkout-total-grand {
    font-size: 1.1rem;
    font-weight: 600;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

/* ── Order, quote & invoice ───────────────────────────────── */
.order-page table,
.quote-items {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.order-page th,
.order-page td,
.quote-items th,
.quote-items td {
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.order-page th,
.quote-items th {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    background: var(--color-surface);
}

.order-page th:first-child, .order-page td:first-child,
.quote-items th:first-child, .quote-items td:first-child { padding-left: 0; }
.order-page th:last-child, .order-page td:last-child,
.quote-items th:last-child, .quote-items td:last-child { padding-right: 0; text-align: right; }

.order-totals,
.quote-totals {
    margin-left: auto;
    margin-top: 1.5rem;
    max-width: 360px;
}

.quote-total-row,
.order-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.3rem 0;
}

.quote-total-grand {
    font-size: 1.1rem;
    font-weight: 600;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.quote-status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    margin-bottom: 2rem;
}

.quote-status-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: var(--color-bg);
}

.quote-paid .quote-status-icon { background: #dcfce7; color: var(--color-success); }
.quote-expired .quote-status-icon { background: #fee2e2; color: var(--color-danger); }

.quote-expiry,
.quote-shipping,
.quote-tax-number { color: var(--color-muted); font-size: 0.925rem; }

.quote-payment-section { margin-top: 2rem; }

.quote-manual-payment-instructions {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    white-space: pre-line;
    font-size: 0.95rem;
}

/* ── Payment result ───────────────────────────────────────── */
.payment-result-page {
    padding-block: var(--section-gap);
    display: flex;
    justify-content: center;
}

.payment-result-container { max-width: 540px; width: 100%; }

.payment-result-loading { text-align: center; padding: 3rem; color: var(--color-muted); }

.payment-result-card {
    text-align: center;
    padding: 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.payment-result-icon {
    font-size: 2.25rem;
    width: 72px;
    height: 72px;
    line-height: 72px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.payment-result-success .payment-result-icon { background: #dcfce7; color: #16a34a; }
.payment-result-failed .payment-result-icon { background: #fee2e2; color: var(--color-danger); }
.payment-result-pending .payment-result-icon { background: #fef3c7; color: var(--color-warning); }

.payment-result-card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.payment-result-message { color: var(--color-muted); margin-bottom: 1.5rem; }
.payment-result-details { margin-bottom: 1.5rem; line-height: 1.9; }

.payment-result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Services & bookings ──────────────────────────────────── */
.service-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.service-card:hover { border-color: var(--color-text); box-shadow: var(--shadow-sm); }

.service-card a { display: block; padding: 1.25rem; }

.service-card h3 { font-size: 1rem; font-weight: 500; margin-bottom: 0.35rem; }

.service-card .price { font-weight: 600; }
.service-card .duration { color: var(--color-muted); font-size: 0.9rem; }

.services-empty { color: var(--color-muted); }

.service-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.service-info h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    margin-bottom: 0.75rem;
}

.service-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.service-category-tag {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    color: var(--color-muted);
    transition: border-color var(--transition), color var(--transition);
}

.service-category-tag:hover { border-color: var(--color-text); color: var(--color-text); }

.service-booking {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
}

.staff-picker, .booking-slot-picker { margin-bottom: 1.75rem; }

.staff-options,
.slot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.staff-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem 0.35rem 0.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color var(--transition), background var(--transition);
}

.staff-option img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.staff-option:hover { border-color: var(--color-text); }

.staff-option.selected {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--brand-contrast);
}

.slot-btn {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--transition), background var(--transition);
}

.slot-btn:hover { border-color: var(--color-text); }

.slot-btn.selected {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--brand-contrast);
}

.slot-empty { color: var(--color-muted); margin-top: 0.75rem; }

.booking-page { max-width: 640px; }

/* ── Blog ─────────────────────────────────────────────────── */
.blog-description { color: var(--color-muted); margin-bottom: 2.5rem; max-width: 65ch; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem 1.75rem;
}

.blog-post-card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--color-surface);
    transition: transform 500ms ease;
}

.blog-post-card { overflow: hidden; }
.blog-post-card a { display: block; }
.blog-post-card:hover .blog-post-card-image { transform: scale(1.03); }

.blog-post-card-body { padding-top: 1rem; }

.blog-post-card-title { font-size: 1.15rem; margin-bottom: 0.4rem; }

.blog-post-card-meta,
.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.blog-tag {
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    color: var(--color-muted);
}

.blog-post { max-width: 760px; margin-inline: auto; }

.blog-breadcrumb { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 1.5rem; }
.blog-breadcrumb a:hover { color: var(--color-text); }

.blog-post-header { margin-bottom: 2rem; }

.blog-post-header h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.75rem);
    margin-bottom: 0.75rem;
}

.blog-post-hero {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    background: var(--color-surface);
}

.blog-post-content { font-size: 1.05rem; line-height: 1.8; }
.blog-post-content h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
.blog-post-content h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
.blog-post-content p { margin-bottom: 1.1rem; }
.blog-post-content ul, .blog-post-content ol { margin: 1.1rem 0; padding-left: 1.5rem; list-style: revert; }
.blog-post-content li { margin-bottom: 0.4rem; }
.blog-post-content img { border-radius: var(--radius); margin: 1.75rem 0; }
.blog-post-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.blog-post-content blockquote {
    border-left: 2px solid var(--color-border);
    padding: 0.25rem 1.25rem;
    margin: 1.75rem 0;
    color: var(--color-muted);
    font-size: 1.1rem;
}

.blog-post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* ── CMS page ─────────────────────────────────────────────── */
/* .page is what the editor's "new content page" scaffold produces. */
.cms-page,
.page { max-width: 760px; margin-inline: auto; }

.page { padding-block: var(--section-gap); }

.cms-page h1,
.page h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.page p { margin-bottom: 1.1rem; }

.page-content { line-height: 1.8; }
.page-content h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.page-content h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
.page-content p { margin-bottom: 1.1rem; }
.page-content ul, .page-content ol { margin-bottom: 1.1rem; padding-left: 1.5rem; list-style: revert; }
.page-content li { margin-bottom: 0.35rem; }
.page-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.page-content img { border-radius: var(--radius); margin: 1.5rem 0; }

/* ── 404 ──────────────────────────────────────────────────── */
.not-found {
    text-align: center;
    padding-block: clamp(4rem, 12vw, 8rem);
}

.not-found h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: 1rem;
}

.not-found p {
    color: var(--color-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 3rem;
    font-size: 0.925rem;
}

.pagination a {
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    transition: border-color var(--transition), background var(--transition);
}

.pagination a:hover { border-color: var(--color-text); background: var(--color-surface); }

.pagination span,
.pagination-info { color: var(--color-muted); }

/* ── Search ───────────────────────────────────────────────── */
.search-page { max-width: 960px; margin-inline: auto; }

.search-page .search-typeahead {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-page .search-typeahead input { flex: 1; }
.search-page .search-typeahead button { flex-shrink: 0; }

.search-meta { color: var(--color-muted); margin-bottom: 2rem; }
.search-empty { text-align: center; padding: 3rem 0; color: var(--color-muted); }

/* ── Search typeahead ─────────────────────────────────────── */
/* The panel is absolutely positioned, so it stays out of the form's flex layout. */
.search-typeahead { position: relative; }

/* storefront.js toggles these with the hidden attribute; any display rule below would
   otherwise out-specify the UA stylesheet's [hidden] { display: none }. */
.search-suggestions [hidden] { display: none; }

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    text-align: left;
}

.header-search .search-suggestions { min-width: 340px; left: auto; }

.search-suggestion-list { max-height: 60vh; overflow-y: auto; }

.search-suggestion a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
}

.search-suggestion.is-active a { background: var(--color-surface); }

.search-suggestion-image {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    flex-shrink: 0;
}

.search-suggestion-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.search-suggestion-name { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestion-brand { font-size: 0.75rem; color: var(--color-muted); }
.search-suggestion-price { font-size: 0.875rem; font-weight: 500; white-space: nowrap; }

.search-suggestion-empty {
    padding: 0.85rem 0.75rem;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.search-suggestion-all {
    display: block;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.search-suggestion-all:hover { background: var(--color-surface); }

/* ── Forms ────────────────────────────────────────────────── */
label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

input[type="email"],
input[type="text"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input::placeholder, textarea::placeholder { color: var(--color-muted); }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(25, 27, 31, 0.08);
}

textarea { min-height: 120px; resize: vertical; }

.error { color: var(--color-danger); font-size: 0.875rem; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .collection-layout { grid-template-columns: 200px minmax(0, 1fr); }
    .checkout-layout { grid-template-columns: minmax(0, 1fr) 320px; }
    .header-search input { width: 150px; }
}

/* The nav needs more room than the page grids do, so it collapses first. */
@media (max-width: 900px) {
    .nav-drawer { display: block; }
    .site-nav { display: none; }
    .header-search { display: none; }

    .header-inner { gap: 0.5rem; }
    .logo { flex: 1; justify-content: center; }
}

@media (max-width: 768px) {
    .collection-layout,
    .checkout-layout,
    .product-detail,
    .service-detail { grid-template-columns: minmax(0, 1fr); }

    .collection-sidebar,
    .product-images,
    .checkout-summary-col,
    .service-booking { position: static; }

    .checkout-summary-col { order: -1; }

    /*
       Stacked, the sidebar is a screenful of filters before the first product. On a phone the
       categories become a wrapping row of chips and the facets sit side by side, so the grid
       starts within a short scroll.
    */
    .collection-sidebar { display: block; }

    .sidebar-categories { margin-bottom: 1.5rem; }

    .category-nav,
    .category-nav li,
    .category-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        padding-left: 0;
    }

    .category-nav li + li { margin-top: 0; }

    .category-nav a {
        margin-left: 0;
        padding: 0.35rem 0.85rem;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-pill);
        font-size: 0.875rem;
    }

    .category-nav a.active {
        background: var(--color-text);
        border-color: var(--color-text);
        color: var(--color-bg);
    }

    [data-filter-form] {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.25rem 1.5rem;
        align-items: start;
    }

    .filter-group { margin-bottom: 0; }

    .filter-submit { grid-column: 1 / -1; margin-top: 0; }

    /* A square image at full width swallows a phone screen. */
    .carousel-slide { aspect-ratio: 4 / 3; }

    /* Swiping is the gesture here, so the arrows and the thumbnail strip only take up room. */
    .carousel-prev,
    .carousel-next,
    .carousel-thumbs { display: none; }
}

@media (max-width: 640px) {
    :root { --header-height: 60px; }

    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.5rem 1rem; }
    .blog-grid { grid-template-columns: minmax(0, 1fr); }

    .section-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

    .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }

    .form-row { grid-template-columns: 1fr; }

    .carousel-thumb { flex: 0 0 56px; width: 56px; height: 56px; }

    /*
       The head is hidden, so each cell has to say what it is on its own: the product spans
       the row, the unit price is labelled from the markup, and quantity, line total and
       remove share the last line.
    */
    .cart-table thead { display: none; }

    .cart-table tr {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "product product product"
            "price   price   price"
            "qty     total   remove";
        gap: 0.75rem;
        align-items: center;
        padding: 1.25rem 0;
        border-bottom: 1px solid var(--color-border);
    }

    .cart-table td { border: none; padding: 0; }
    .cart-table td:nth-child(1) { grid-area: product; }
    .cart-table td:nth-child(2) { grid-area: price; color: var(--color-muted); font-size: 0.9rem; }
    .cart-table td:nth-child(3) { grid-area: qty; }
    .cart-table td:nth-child(4) { grid-area: total; text-align: right; font-weight: 600; }
    .cart-table td:nth-child(5) { grid-area: remove; text-align: right; }

    .cart-table td[data-label]::before { content: attr(data-label) " "; }

    .cart-footer { justify-content: space-between; }
    .cart-item-image { width: 56px; height: 56px; }
}

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