@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/Poppins-Light.woff2') format('woff2'),
         url('/fonts/Poppins-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Poppins';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/Poppins-LightItalic.woff2') format('woff2'),
         url('/fonts/Poppins-LightItalic.ttf') format('truetype');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/Poppins-Regular.woff2') format('woff2'),
         url('/fonts/Poppins-Regular.ttf') format('truetype');
}

html {
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-weight: 300;
    /* Only 300/400 are registered above - without this, a UA request for the default bold
       weight (700) would fall back to browser-synthesized ("faux") bold on the Light face
       instead of actually rendering the Regular (400) face strong/b are pinned to below. */
    font-synthesis: none;
    /* Clears .site-header (position: sticky, ~93px tall: 1rem padding top+bottom + 60px logo + 1px
       border) so fragment navigation (e.g. #Neck_girth from MarkdownService heading anchors) doesn't
       land underneath it. */
    scroll-padding-top: 96px;
}

strong,
b {
    font-weight: 400;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow-x: clip;
}

/* Site-wide: links stay black regardless of visited state - no default browser blue/purple
   anywhere on the site. Elements that already set their own link color (e.g. .button, .basket-
   link via color: inherit) are unaffected since this only sets the base a/a:visited color. */
a:link,
a:visited {
    color: #000;
}

.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

@supports (animation-timeline: view()) and (timeline-scope: --t) {
    .page.has-hero-logo {
        timeline-scope: --hero-logo-timeline;
    }
}

.site-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0 0 0;
    border-bottom: 1px solid #000;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    font-size: 0.9rem;
}

/* Homepage only: the header overlays the full-bleed hero image (position:fixed, out of flow). The
   resting/scrolled-past state is the white bar here; over the hero it animates back to transparent. */
.page.has-hero-logo .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: calc(1rem + 3px) 1rem 3px;
    background: #fff;
    border-bottom: none;
    z-index: 2;
}

@supports (animation-timeline: view()) and (timeline-scope: --t) {
    .page.has-hero-logo .site-header {
        animation: header-bg-in linear both;
        animation-timeline: --hero-logo-timeline;
        animation-range: exit 85% exit 100%;
    }
}

@keyframes header-bg-in {
    from {
        background: transparent;
    }
    to {
        background: #fff;
    }
}

/* JS fallback. Keep the .page.has-hero-logo prefix to outrank the base white bar (specificity). */
.page.has-hero-logo .site-header.js-over-hero {
    background: transparent;
    transition: background 0.3s ease;
}

/* Three groups keep the logo centred: equal-flex side groups (flex:1 1 0) with the logo
   as a fixed-width (flex:0 0 auto) centre item. The logo stays in flow, so the sticky
   header height and the scroll-reveal scale() animation below are unaffected. */
.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1 1 0;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 0;
    min-width: 0;
    justify-content: flex-end;
}

.logo-mark {
    display: block;
    height: 60px;
    width: auto;
    transform: translateX(10px);
}

.site-header .logo {
    position: relative;                /* positioning context for the overflowing wordmark */
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    opacity: 1;
}

/* Wordmark shows in the header only on the homepage (shared template -> hidden elsewhere). */
.logo-wordmark {
    display: none;
}

/* Monogram (jp): hidden over the hero, scales/fades in once the hero has scrolled past. */
@supports (animation-timeline: view()) and (timeline-scope: --t) {
    .page.has-hero-logo .site-header .logo-mark {
        opacity: 0;
        animation: reveal-header-logo linear both;
        animation-timeline: --hero-logo-timeline;
        animation-range: exit 85% exit 100%;
    }
}

@keyframes reveal-header-logo {
    from {
        opacity: 0;
        transform: translateX(10px) scale(0.6);
    }
    to {
        opacity: 1;
        transform: translateX(10px) scale(1);
    }
}

/* Homepage wordmark: centre logo slot over the hero. Base opacity:0; shown by the animation (modern)
   or .js-over-hero (fallback), fading out as the monogram fades in. width + translate are tune-knobs
   (readable line ~2/5 down the art, J/P flourishes overflow the row). */
.page.has-hero-logo .site-header .logo-wordmark {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 240px;
    max-width: none;
    opacity: 0;
    pointer-events: none;
    transform: translate(calc(-50% - 8px), calc(-50% + 15px));
}

@media (max-width: 1023px) {
    .page.has-hero-logo .site-header .logo-wordmark {
        width: 150px;
    }
}

@supports (animation-timeline: view()) and (timeline-scope: --t) {
    .page.has-hero-logo .site-header .logo-wordmark {
        animation: hide-wordmark linear both;
        animation-timeline: --hero-logo-timeline;
        animation-range: exit 85% exit 100%;
    }
}

@keyframes hide-wordmark {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* JS fallback (hero-logo.js). */
.site-header .logo-mark.js-logo-visible {
    opacity: 1;
    transform: translateX(10px) scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-header .logo-mark.js-logo-hidden {
    opacity: 0;
    transform: translateX(10px) scale(0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Keep the .page.has-hero-logo prefix to outrank the base wordmark opacity:0 (specificity). */
.page.has-hero-logo .site-header.js-over-hero .logo-wordmark {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Over the hero the top-bar text/icons start white and darken as it scrolls past. Targeted at just
   the top-bar items (not the whole header) so opened dropdown/basket panels keep dark-on-white text;
   currentColor carries the colour to the hamburger bars and SVGs. */
@supports (animation-timeline: view()) and (timeline-scope: --t) {
    .page.has-hero-logo .site-header .nav-toggle-label,
    .page.has-hero-logo .site-header .primary-nav .nav-dropdown-trigger,
    .page.has-hero-logo .site-header .account-nav a,
    .page.has-hero-logo .site-header .basket-link {
        color: #fff;
        animation: darken-header-item linear both;
        animation-timeline: --hero-logo-timeline;
        animation-range: exit 85% exit 100%;
    }
}

@keyframes darken-header-item {
    from {
        color: #fff;
    }
    to {
        color: #000;
    }
}

/* JS fallback (hero-logo.js). */
.site-header.js-over-hero .nav-toggle-label,
.site-header.js-over-hero .primary-nav .nav-dropdown-trigger,
.site-header.js-over-hero .account-nav a,
.site-header.js-over-hero .basket-link {
    color: #fff;
    transition: color 0.3s ease;
}

/* Full-bleed hero: breaks out of .page's centred column to fill the viewport, 100svh tall, and hosts
   the --hero-logo-timeline that drives the header reveal. */
.hero-section {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: 100vh;                      /* fallback for engines without svh */
    height: 100svh;
    overflow: hidden;

    view-timeline-name: --hero-logo-timeline;
    view-timeline-axis: block;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;        /* crop bias; tune by eye */
    display: block;
}

.primary-nav {
    display: none;
    align-items: center;
    align-self: stretch;
    gap: 1.25rem;
}

.primary-nav-link {
    color: inherit;
    text-decoration: none;
}

/* Shared, reusable nav dropdown used by "categories" and "about" on desktop (>=768px).
   Each dropdown is a .nav-dropdown instance; its flyout panel is scoped to its own
   container via the checkbox-sibling (~) selector. On mobile these same two items render
   as .nav-accordion <li>s inside .site-nav instead (inline expand/collapse, see below). */
.nav-dropdown {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.nav-dropdown-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* Small downward chevron in each dropdown/accordion trigger, signalling it opens a menu.
   Rotates 180deg while the dropdown is open (reveal rules below add the rotate). */
.nav-chevron {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

/* Overlay flyout - position:absolute so it never reflows header/page layout. Collapses
   topward (scaleY from a top transform-origin) rather than a plain fade, and does so
   almost instantly - the 0.5s transition-delay below only delays the *start* of that
   collapse after the mouse/tap leaves (the hover/focus/checked rule below sets delay:
   0s, so opening is immediate - the delay only ever applies to hiding). */
.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    background: #fff;
    border: 1px solid #000;
    padding: 0.5rem;
    width: min(220px, 85vw);
    display: flex;
    flex-direction: column;
    z-index: 5;
    visibility: hidden;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 0.12s ease, visibility 0.12s ease, transform 0.12s ease;
    transition-delay: 0.15s;
}

.nav-dropdown-panel--desktop {
    left: 0;
}

.nav-dropdown-link {
    display: block;
    padding: 0.5rem;
    color: inherit;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    /* Matches .nav-dropdown-panel's own hide-delay by default, so a link's text doesn't
       vanish ahead of the panel box itself during the 0.15s linger - the "open" rules
       below override this per-link with a short staggered delay instead. */
    transition-delay: 0.15s;
}

.nav-dropdown-link:hover {
    background: #f5f5f5;
}

/* Desktop: hover-only. Hovering the .nav-dropdown shows the panel instantly
   (transition-delay: 0s overrides the 0.15s hide-delay above); moving off it lets the
   short delay play out before it collapses, giving the pointer time to travel from the
   trigger down into the flush-attached panel without it disappearing mid-move. No
   checkbox/focus state is involved on desktop (the trigger is a plain <span>), so a
   click can never latch the panel open. */
.nav-dropdown:hover .nav-dropdown-panel--desktop {
    visibility: visible;
    opacity: 1;
    transform: scaleY(1);
    transition-delay: 0s;
}

/* Flip the chevron while a menu is open - desktop (hover flyout) and mobile (checked
   accordion) both covered here. */
.nav-dropdown:hover .nav-chevron,
#categories-toggle-mobile:checked ~ .nav-dropdown-trigger .nav-chevron,
#about-toggle-mobile:checked ~ .nav-dropdown-trigger .nav-chevron {
    transform: rotate(180deg);
}

/* Per-link stagger - each line fades/slides in a touch after the previous one, but
   only while opening; the base rule above (0.15s delay) takes back over on close so
   lines disappear together with the panel's own collapse, not one by one. */
.nav-dropdown:hover .nav-dropdown-panel--desktop .nav-dropdown-link {
    opacity: 1;
    transform: translateY(0);
}

.nav-dropdown:hover .nav-dropdown-panel--desktop .nav-dropdown-link:nth-child(1) {
    transition-delay: 0s;
}

.nav-dropdown:hover .nav-dropdown-panel--desktop .nav-dropdown-link:nth-child(2) {
    transition-delay: 0.04s;
}

.nav-dropdown:hover .nav-dropdown-panel--desktop .nav-dropdown-link:nth-child(3) {
    transition-delay: 0.08s;
}

.nav-dropdown:hover .nav-dropdown-panel--desktop .nav-dropdown-link:nth-child(4) {
    transition-delay: 0.12s;
}

.nav-dropdown:hover .nav-dropdown-panel--desktop .nav-dropdown-link:nth-child(5) {
    transition-delay: 0.16s;
}

/* Opening the basket forces any open desktop dropdown flyout shut so the two overlays
   never show at once - clicking "My basket" doesn't uncheck a dropdown's checkbox, it
   just forces this visual override closed while #basket-toggle is checked, then the
   panel's normal hover/checked state resumes once the basket is closed again. The
   :has(#basket-toggle:checked) selector gives this (1,2,0) specificity, which ties the
   highest panel-level "open" rule above but wins by source order (it comes later) so it
   always wins the conflict instead of needing !important.
   transition: none (not just transition-delay: 0s) is required here: moving the mouse
   toward the basket icon ends .nav-dropdown:hover a moment *before* the click lands
   and checks #basket-toggle, which already kicks off the normal 0.5s-delayed close
   transition using the delay that was in effect at that earlier instant. A later
   transition-delay change doesn't retroactively speed up a transition that's already
   pending/running, so only cancelling the transition outright (via transition: none)
   reliably snaps the panel shut the instant the basket opens. */
.site-header:has(#basket-toggle:checked) .nav-dropdown-panel--desktop {
    visibility: hidden;
    opacity: 0;
    transform: scaleY(0);
    transition: none;
}

/* Mobile inline accordion - the "categories"/"about" items inside .site-nav expand their
   links underneath themselves (pushing the menu below down), instead of a floating flyout.
   Keyed off the same per-item checkbox as the desktop flyout. */
.nav-accordion-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

#categories-toggle-mobile:checked ~ .nav-accordion-panel,
#about-toggle-mobile:checked ~ .nav-accordion-panel {
    /* generous cap - sized for the full category/about link set; bump if lists grow */
    max-height: 500px;
}

/* .nav-dropdown-link defaults to opacity:0 (the desktop flyout fade); inside the inline
   accordion the links must just be plainly visible with no stagger/transform. */
.nav-accordion-panel .nav-dropdown-link {
    opacity: 1;
    transform: none;
    transition-delay: 0s;
}

/* Desktop right-side account links. Hidden on mobile (the same links render inside the
   .site-nav hamburger menu there); shown as a horizontal row at >=768px. */
.account-nav {
    display: none;
}

.account-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.account-nav a {
    text-decoration: none;
    color: inherit;
}

.basket-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.icon {
    display: block;
}

.basket-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.basket-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 100vw);
    background: #fff;
    border-left: 1px solid #000;
    padding: 1rem;
    overflow-y: auto;
    z-index: 2;
    transform: translateX(100%);       /* off-screen right when closed; slides in when checked */
    transition: transform 0.3s ease;
}

/* #basket-toggle lives inside .header-right, no longer a sibling of #basket-panel, so
   reach it via :has() on the shared .site-header (same pattern as .site-nav above). */
.site-header:has(#basket-toggle:checked) .basket-panel {
    transform: translateX(0);
}

.basket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.basket-header h3 {
    margin: 0;
}

.basket-close {
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.basket-items {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.basket-item {
    display: flex;
    gap: 1rem;
}

.basket-item-photo {
    display: block;
    width: 80px;
    height: 120px;
    object-fit: cover;
    flex-shrink: 0;
}

.basket-item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.basket-item-name {
    font-weight: 400;
}

.basket-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.basket-item-remove {
    border: 1px solid #000;
    background: none;
    padding: 0.25rem 0.5rem;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.basket-item-remove:hover {
    box-shadow: inset 0 0 0 1px #000;
}

.basket-total {
    display: flex;
    justify-content: space-between;
    font-weight: 400;
    padding: 0.75rem 0;
    border-top: 1px solid #000;
    margin-bottom: 1rem;
}

/* Delivery + Total shown together (checkout prepare/confirm) - one shared top border instead of
   each row carrying its own, so only a single line separates this block from what's above it. */
.basket-totals {
    border-top: 1px solid #000;
    padding-top: 0.75rem;
    margin-bottom: 1rem;
}

.basket-totals .basket-total-row {
    display: flex;
    justify-content: space-between;
}

.basket-totals .basket-total-row-delivery {
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.basket-totals .basket-total-row-total {
    font-weight: 400;
}

.basket-item-customisations {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    font-size: 0.75rem;
    color: #767676;
}

.order-payment-item .basket-item-details {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.order-payment-item .basket-item-customisations {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    flex: 1;
}

.payment-note {
    font-size: 0.75rem;
    color: #767676;
}

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

.orders-table th,
.orders-table td {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid #000;
}

.order-unpaid-marker {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border: 1px solid #b00020;
    color: #b00020;
    font-size: 0.75rem;
    font-weight: 400;
}

.customisation-missing {
    color: #b00020;
}

.button {
    display: block;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: none;
    border: 1px solid #000;
    padding: 0.5rem;
    font: inherit;
    font-weight: 400;
    cursor: pointer;
}

/* Inset box-shadow (not a wider border) so the extra pixel doesn't shift layout/size on hover. */
.button:hover {
    box-shadow: inset 0 0 0 1px #000;
}

/* a:link/a:visited (below) has higher specificity than .button's color: inherit, which would
   otherwise force a flat black on any <a class="button">, including a future inverted one (e.g.
   .button-primary applied to a link). Keep anchor-buttons inheriting their color instead. */
a.button:link,
a.button:visited {
    color: inherit;
}

/* Primary call-to-action buttons (checkout's "Review order"/"Confirm order") - full width,
   bold, inverted from the default outline-only .button look. Combined with class="button" so
   it still picks up shared rules (e.g. the :has(.floating-label-field) height-matching fix). */
.button-primary {
    width: 100%;
    background: #000;
    color: #fff;
    transition: background 0.2s ease;
}

.button-primary:hover {
    background: #333;
    box-shadow: none;
}

.auth-form {
    width: 80%;
    margin: 0 auto;
}

/* .button has no width of its own (buttons shrink-to-fit their content even with
   display:block), so match it explicitly to the floating-label-field inputs above it. */
.auth-form .button {
    width: 100%;
}

@media (min-width: 768px) {
    .auth-form {
        width: 50%;
    }
}

.form-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.form-field label {
    flex: 0 0 10rem;
}

.form-field input,
.form-field select {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.4rem;
    border: 1px solid #000;
    font: inherit;
}

.form-field select {
    flex: 0 0 auto;
    min-width: 8rem;
}

.form-field .input-small {
    flex: 0 0 4.5rem;
}

.form-field .form-error {
    flex-basis: 100%;
    color: #b00020;
    font-size: 0.875rem;
}

.form-notice {
    color: #2e7d32;
}

.piece-customisations {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex: 1 1 auto;
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: none;
}

.radio-group input[type="radio"] {
    flex: none;
    width: auto;
    padding: 0;
    border: none;
}

@media (min-width: 1024px) {
    /* CSS multi-column (not Grid) so each column's height is driven purely by its own content -
       a Grid with grid-template-areas ties row heights across both columns, which would force
       "Your pieces" to align with "Promo & total" whenever "Delivery address" runs long. With an
       auto-height multicol container, browsers fill column 1 top-to-bottom until the forced
       break-before below, then continue in column 2 - giving auth+pieces / address+promo as two
       independently-flowing columns. */
    .checkout-panels {
        column-count: 2;
        column-gap: 1.5rem;
    }

    .checkout-panel-address {
        break-before: column;
    }
}

/* Order-confirmed page: two real columns (left = Pieces + Address, right = Payment/Status),
   not the multi-column break trick above - the left/right grouping here is a literal DOM
   split, not an emergent property of column-balancing rules. */
.order-payment-columns {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-payment-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .order-payment-columns {
        flex-direction: row;
        align-items: flex-start;
    }

    .order-payment-column {
        flex: 1 1 0;
        min-width: 0;
    }
}

.checkout-panel {
    border: 1px solid #000;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    break-inside: avoid;
}

.checkout-panel h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.checkout-panel h3 {
    font-size: 0.95rem;
}

.checkout-panel .auth-form {
    width: auto;
    margin: 0;
}

/* Login-vs-guest toggle: two radios, one panel each, following the .basket-toggle/.carousel-radio
   CSS-only :checked pattern used elsewhere in this project - no JS. */
.checkout-auth-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Segmented-control look for checkout radio choices (auth mode, delivery method) - the underlying
   radio can stay visually hidden (e.g. .checkout-auth-toggle above); :has(:checked) still matches
   regardless, so the label itself carries the selected/unselected affordance. */
.checkout-toggle-group label {
    border: 1px solid #000;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.checkout-toggle-group label:has(:checked) {
    background: #000;
    color: #fff;
}

.checkout-toggle-logo {
    height: 1.5em;
    width: auto;
    display: block;
}

.checkout-panel-auth:has(#auth-mode-login:checked) .checkout-auth-guest-panel {
    display: none;
}

.checkout-panel-auth:has(#auth-mode-guest:checked) .checkout-auth-login-panel {
    display: none;
}

/* Register toggle, nested inside the login form - swaps between the separate login and register
   forms (kept as two genuinely distinct <form>s, since HTML forbids nesting one inside the other
   and sharing a single form across both would make Enter-key implicit submission ambiguous once
   more than one submit button is present). */
.checkout-register-form-wrapper {
    display: none;
}

.checkout-auth-login-panel:has(.checkout-register-toggle:checked) .checkout-login-form-wrapper {
    display: none;
}

.checkout-auth-login-panel:has(.checkout-register-toggle:checked) .checkout-register-form-wrapper {
    display: block;
}

/* Billing address differs toggle - checked means "differs", following the same pattern. */
.checkout-panel-address:not(:has(.billing-differs-toggle:checked)) .checkout-billing-address-section {
    display: none;
}

.checkout-terms {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.75rem 0;
}

/* "Review order" shows as disabled until the terms box is ticked. The checkbox's `required`
   attribute is what actually blocks the native submit (and Enter-to-submit) and surfaces the
   browser's prompt; this is the matching visual cue. CheckoutController.confirm() re-checks
   server-side. Button stays clickable (no pointer-events:none) so clicking it triggers the
   native "please tick this box" bubble. */
#checkout-prepare:not(:has(#accept-terms:checked)) .button-primary {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Floating-label inputs, used throughout the checkout form only - login/register/profile keep
   the plain label-left .form-field layout untouched. Input needs placeholder=" " (a literal
   space, not empty) so :placeholder-shown reliably tracks "has no value", and the <label> must
   come after the <input> in markup (sibling, not wrapper) for the + selector below to reach it. */
.floating-label-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0.75rem;
}

.floating-label-field input,
.floating-label-field select {
    width: 100%;
    padding: 1.1rem 0.6rem 0.4rem;
    border: 1px solid #000;
    font: inherit;
    background: transparent;
}

.floating-label-field label {
    position: absolute;
    left: 0.7rem;
    top: 0.75rem;
    max-width: calc(100% - 1.4rem);
    font-size: 1rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transition: top 0.1s ease, font-size 0.1s ease, color 0.1s ease;
}

.floating-label-field input:focus + label,
.floating-label-field input:not(:placeholder-shown) + label {
    top: 0.25rem;
    font-size: 0.7rem;
}

.floating-label-field-textarea {
    margin-bottom: 0.75rem;
}

.floating-label-field-textarea label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: #555;
}

.checkout-comment-textarea {
    width: 100%;
    min-height: 4rem;
    padding: 0.6rem;
    border: 1px solid #000;
    font: inherit;
    background: transparent;
    resize: vertical;
}

/* A <select> has no :placeholder-shown equivalent and never looks "empty" the way a blank text
   input does (it always shows a real selection or its own empty option) - so its label is always
   rendered already shrunk, with no grow/shrink animation to key off of. */
.floating-label-field select + label {
    top: 0.25rem;
    font-size: 0.7rem;
}

.floating-label-field input:focus,
.floating-label-field select:focus {
    outline: 2px solid #000;
    outline-offset: -1px;
}

/* Omniva country/city/parcel-machine selects can have long option text (machine name + address) -
   ellipsis instead of overflowing. The box itself already fills the row via the shared
   .floating-label-field input/select rule above, unlike the old .form-field select default. */
.floating-label-field select.checkout-address-select {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Parcel-machine picker: a floating-label-field whose visible text input drives a live,
   client-fetched dropdown (see /js/parcel-machine-picker.js) - same box/positioning
   conventions as .tag-typeahead-suggestions in admin.css, ported here for the public site. */
.parcel-machine-picker-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #000;
    border-top: none;
    max-height: 16rem;
    overflow-y: auto;
}

.parcel-machine-picker-group {
    padding: 0.4rem 0.6rem;
    color: #555;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: default;
    background: #f5f5f5;
}

.parcel-machine-picker-option {
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}

.parcel-machine-picker-option:hover {
    background: #f5f5f5;
}

.parcel-machine-picker-option-address {
    font-size: 0.8rem;
    color: #555;
}

.parcel-machine-picker-input:disabled {
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Phone country-code picker: same client-filtered-suggestions pattern as the parcel-machine
   picker above (see /js/phone-country-picker.js), minus the city-group variant - there's no
   grouping concept here, just a flat country list. */
.phone-country-picker-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #000;
    border-top: none;
    max-height: 16rem;
    overflow-y: auto;
}

.phone-country-picker-option {
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}

.phone-country-picker-option:hover {
    background: #f5f5f5;
}

.floating-label-field + .form-error,
.form-row + .form-error {
    display: block;
    color: #b00020;
    font-size: 0.875rem;
    margin-top: -0.4rem;
    margin-bottom: 0.75rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
}

.form-row-city-postal .form-field-city {
    flex: 3 1 0;
}

.form-row-city-postal .form-field-postal {
    flex: 2 1 0;
}

.form-row-phone .phone-country-picker {
    flex: 0 0 10rem;
}

.form-row-phone .form-row-phone-number {
    flex: 1 1 0;
}

.form-row-promo {
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.form-row-promo .floating-label-field {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.form-field-day {
    flex: 0 0 6rem;
}

/* Buttons next to/above a floating-label field should match its height - the input's vertical
   padding totals 1.5rem (1.1rem + 0.4rem), so give the button the same vertical total. Scoped via
   :has() to containers that actually hold a floating-label-field, so unrelated .button usages
   (admin pages, basket panel, etc.) are untouched. */
.auth-form:has(.floating-label-field) .button,
.checkout-panel:has(.floating-label-field) .button {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    cursor: pointer;
    opacity: 0.8;
}

.nav-toggle-label span {
    display: block;
    height: 2px;
    background: currentColor;
}

/* Mobile slide-in menu: like the basket panel but docked LEFT. Mutually exclusive with the basket
   via mobile-menus.js. z-index above the fixed header + basket panel. */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 80%;
    background: #fff;
    border-right: 1px solid #000;
    padding: 1rem;
    overflow-y: auto;
    z-index: 3;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.site-header:has(#nav-toggle:checked) .site-nav {
    transform: translateX(0);
}

.site-nav-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.nav-close {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-nav a {
    text-decoration: none;
    color: inherit;
}

@media (min-width: 768px) {
    .nav-toggle-label {
        display: none;
    }

    .primary-nav {
        display: flex;
    }

    /* Desktop: the mobile hamburger menu is hidden; the right-side account links show as
       a horizontal row inside .header-right instead. */
    .site-nav {
        display: none;
    }

    .account-nav {
        display: block;
    }

    .account-nav ul {
        flex-direction: row;
        padding: 0;
        gap: 1.5rem;
    }
}

.piece-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .piece-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.piece-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.piece-card img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: contain;
}

.piece-card-photo {
    position: relative;
    width: 100%;
}

.piece-card-photo-primary {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.piece-card-photo-hover {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.piece-card:hover .piece-card-photo-primary {
    opacity: 0;
}

.piece-card:hover .piece-card-photo-hover {
    opacity: 1;
}

.piece-card .piece-name,
.piece-card .piece-price {
    margin: 0.5rem 0 0;
}

.piece-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

/* Recommendations ("Other pieces"): own grid, name under image, no price.
   Cards reuse .piece-card* styling (incl. the primary/hover swap). */
.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);   /* mobile: 2 across -> 2 rows of 2 */
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .recommendation-grid {
        grid-template-columns: repeat(4, 1fr);   /* desktop: 4 across */
    }
}

.catalogue-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.catalogue-toolbar select,
.catalogue-price-input {
    padding: 0.4rem;
    border: 1px solid #000;
    font: inherit;
}

.catalogue-price-input {
    flex: 0 1 8rem;
    min-width: 0;
}

.catalogue-empty {
    text-align: center;
    padding: 2rem 0;
}

.breadcrumbs {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: inherit;
}

.breadcrumbs-sep {
    margin: 0 0.4rem;
    color: #767676;
}

.piece-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0;
}

.piece-detail-photo {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.piece-main-photo-wrapper {
    position: relative;
}

.piece-detail-main-photo {
    display: block;
    width: 100%;
    height: auto;
}

.photo-zoom-area {
    display: block;
    cursor: zoom-in;
}

.photo-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3rem;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    color: #000;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-nav:hover {
    opacity: 1;
}

.photo-nav-prev {
    left: 0;
    justify-content: flex-start;
}

.photo-nav-prev::before {
    content: "\2039";
    padding-left: 0.5rem;
}

.photo-nav-next {
    right: 0;
    justify-content: flex-end;
}

.photo-nav-next::before {
    content: "\203a";
    padding-right: 0.5rem;
}

.lightbox-close {
    display: none;
}

/* .photo-nav is position:absolute, narrowed to just the clickable arrow strip at each edge, so
   it paints above the (static-positioned) .photo-zoom-area label regardless of DOM order,
   intercepting clicks only on those edges - everywhere else on the photo falls through to the
   label and opens the lightbox. .lightbox-close is likewise positioned (only once checked) so it
   wins over .photo-nav for the small top-right corner the two might otherwise share. */
.lightbox-toggle:checked ~ .piece-main-photo-wrapper {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox-toggle:checked ~ .piece-main-photo-wrapper .piece-detail-main-photo {
    width: auto;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: zoom-in;
}

.lightbox-toggle:checked ~ .piece-main-photo-wrapper .photo-zoom-area {
    cursor: zoom-in;
}

.lightbox-toggle:checked ~ .piece-main-photo-wrapper .lightbox-close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    width: auto;
    height: auto;
    font-size: 2.5rem;
    line-height: 1;
    color: #fff;
    background: none;
    cursor: pointer;
}

.piece-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.piece-thumb {
    display: block;
    flex: 0 0 calc((100% - 3 * 0.5rem) / 4);
    min-width: 0;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: 1px solid #000;
    cursor: pointer;
}

.piece-thumb-selected {
    border-width: 3px;
}

.piece-detail-info h1 {
    margin-top: 0;
}

.piece-detail-collection {
    margin: 0 0 1rem;
    color: #767676;
}

.piece-detail-description {
    margin-bottom: 2rem;
}

.piece-detail-materials {
    margin: 0;
    color: #767676;
}

.piece-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.piece-detail-care > summary {
    cursor: pointer;
    font-weight: 500;
    padding: 0.25rem 0;
}

.piece-detail-care[open] > summary {
    margin-bottom: 0.5rem;
}

.piece-detail-price {
    font-weight: 400;
    font-size: 1.25rem;
    margin: 0;
}

@media (min-width: 768px) {
    .piece-detail {
        flex-direction: row;
        align-items: flex-start;
    }

    .piece-detail-photo {
        flex: 0 0 40%;
        min-width: 0;
    }

    .piece-detail-main-photo {
        aspect-ratio: 2 / 3;
        object-fit: cover;
    }

    .piece-detail-info {
        flex: 1;
    }
}

.site-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #000;
}

.footer-columns {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    justify-content: center;
}

.footer-logo img {
    display: block;
    height: 80px;
    width: auto;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.footer-column h4 {
    margin: 0 0 0.5rem;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-column a {
    text-decoration: none;
    color: inherit;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    max-width: 16rem;
    margin: 2rem auto 0;
}

.footer-social a {
    color: inherit;
    display: inline-flex;
}

@media (min-width: 768px) {
    .footer-columns {
        flex-direction: row;
        justify-content: space-around;
        align-items: flex-start;
    }

    .footer-links {
        display: contents;
    }
}

img.md {
    max-width: 50%;
    margin: auto;
    display: block;
}

.carousel {
    position: relative;
    padding-bottom: 1.5rem;
}

.carousel-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.carousel-track {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.carousel-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 1rem;
    max-width: 60%;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

.carousel-caption-left {
    left: 1rem;
}

.carousel-caption-right {
    right: 1rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.carousel-dot {
    display: block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 1px solid #000;
    background: transparent;
    cursor: pointer;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.prose {
    text-align: justify;
    font-size: 1rem;
    line-height: 1.75;
}

.press-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    padding: 0 1rem 2.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #767676;
}

.press-strip span:not(:last-child)::after {
    content: "·";
    margin-left: 1.5rem;
    color: #767676;
}

.category-explorer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .category-explorer {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

.category-tile {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-tile img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: filter 0.2s ease;
}

.category-tile:hover img,
.category-tile:focus-visible img,
.category-tile:active img {
    filter: brightness(1.15);
}

.lowercase {
    text-transform: lowercase;
}

.category-tile-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.video-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.video-feature-player {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
}

.development-notice {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #000;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.development-notice-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
}

.video-feature-caption {
    margin: 0;
    text-align: center;
    font-size: 0.85rem;
    color: #767676;
}