/*
 * Loom storefront design system.
 *
 * Ported verbatim from the Blade layout's inline <style> block. It carried
 * no interpolated values, so it becomes a static, revisioned theme asset
 * with no behaviour change.
 */

:root {
    --lo-ink: #1c1c1c;
    --lo-line: #dddddd;
    --lo-sale: #e32c2b;
    --lo-gutter: 1.25rem;
    --lo-section: 2.5rem;
}

body {
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 0.875rem;
    color: var(--lo-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* Headings and buttons share one uppercase, wide-tracked treatment —
   the single strongest characteristic of this storefront's type. */
.lo-heading,
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1.3;
}

/* Three states, in order of precedence:
   at rest on an unscrolled page the artwork shows straight through; once
   scrolled it picks up a light translucent wash; hover, focus or an open
   dropdown make it solid white.

   At rest it carries a soft white scrim that fades to nothing a little below
   the bar. The header reads as transparent, but the dark menu keeps its
   contrast over a dark hero instead of disappearing into it. */
.lo-header {
    background-color: transparent;
    background-image: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.75) 55%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: background-color 0.25s ease, box-shadow 0.25s ease,
        -webkit-backdrop-filter 0.25s ease, backdrop-filter 0.25s ease;
}

.lo-header[data-scrolled="true"] {
    background-color: rgba(255, 255, 255, 0.3);
    background-image: none;
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
}

.lo-header:hover,
.lo-header:focus-within,
.lo-header[data-solid="true"] {
    background-color: #fff;
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 1px 0 var(--lo-line);
}

/* Reserves the fixed header's height on pages that do not run content
   underneath it. Kept in one place so the two cannot drift apart. */
.lo-header-spacer { height: 68px; }

@media (min-width: 1024px) {
    .lo-header-spacer { height: 77px; }
}

.lo-shell {
    max-width: 85rem;
    margin-inline: auto;
    padding-inline: var(--lo-gutter);
}

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

/* Buttons: square, uppercase, wide-tracked. */
.lo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.75rem 1.75rem;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    border: 1px solid var(--lo-ink);
    background: var(--lo-ink);
    color: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lo-btn:hover:not(:disabled) { background: #000; }
.lo-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.lo-btn--outline { background: transparent; color: var(--lo-ink); }
.lo-btn--outline:hover:not(:disabled) { background: var(--lo-ink); color: #fff; }

.lo-field {
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--lo-line);
    background: #fff;
    font-size: 0.875rem;
}

.lo-field:focus { outline: none; border-color: var(--lo-ink); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--lo-ink);
    outline-offset: 2px;
}

.lo-skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 90;
    background: var(--lo-ink);
    color: #fff;
    padding: 0.75rem 1.25rem;
    transition: top 0.2s ease;
}

.lo-skip:focus { top: 1rem; }

/* Image rollover: the second image fades in over the first. */
.lo-media { position: relative; overflow: hidden; background: #f5f5f5; }
.lo-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lo-media__secondary {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
}

@media (hover: hover) {
    .lo-card:hover .lo-media__secondary,
    .lo-card:focus-within .lo-media__secondary { opacity: 1; }
}

.aspect-tall { aspect-ratio: 2 / 3; }

/* Drawn placeholder for products with no stored image. */
.lo-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        repeating-linear-gradient(45deg, rgba(28, 28, 28, 0.04) 0 10px, transparent 10px 20px),
        #f5f5f5;
    font-size: 0.6875rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #9a9a9a;
}

/* Option swatches are labels bound to visually hidden radios, so the
   control is a real radio group for keyboard and screen readers. */
.lo-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.85rem;
    border: 1px solid var(--lo-line);
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.lo-swatch:hover { border-color: var(--lo-ink); }

input:checked + .lo-swatch {
    border-color: var(--lo-ink);
    box-shadow: inset 0 0 0 1px var(--lo-ink);
}

input:focus-visible + .lo-swatch { outline: 2px solid var(--lo-ink); outline-offset: 2px; }

input:disabled + .lo-swatch {
    color: #b5b5b5;
    cursor: not-allowed;
    background:
        linear-gradient(to top left, transparent calc(50% - 1px), #e2e2e2 50%, transparent calc(50% + 1px));
}

/* Loom styling for platform-owned product reviews. */
.lo-review-compact > p {
    display: flex !important;
    align-items: center;
    gap: 0.45rem !important;
    margin: 0 0 1.25rem !important;
    color: #5f5f5f;
    font-size: 0.75rem !important;
}

.lo-review-compact > p > span:first-child {
    color: var(--lo-ink) !important;
}

.lo-review-compact strong { color: var(--lo-ink); font-weight: 500; }

.lo-reviews { border-top: 1px solid var(--lo-line); }

.lo-reviews #product-reviews {
    max-width: 85rem !important;
    margin: 0 auto !important;
    padding: clamp(2.5rem, 5vw, 4.5rem) var(--lo-gutter) !important;
    scroll-margin-top: 6rem;
}

.lo-reviews #product-reviews-title {
    margin: 0 0 2rem !important;
    font-size: 0.6875rem !important;
    font-weight: 400 !important;
    text-wrap: balance;
}

.lo-reviews #product-reviews > h2 + p:not([aria-label]) {
    margin: 0 0 1.25rem !important;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--lo-line);
    background: #f7f7f7;
    color: #5f5f5f;
    font-size: 0.875rem;
}

.lo-reviews #product-reviews > p[aria-label] {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    margin: 0 0 1.5rem !important;
    font-size: 0.875rem !important;
}

.lo-reviews #product-reviews > p[aria-label] > span {
    color: var(--lo-ink) !important;
    font-size: 1.125rem;
}

.lo-reviews #product-reviews > p[aria-label] strong {
    font-size: 1.5rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.lo-reviews #product-reviews > dl {
    gap: 0.625rem !important;
    max-width: 32rem !important;
    margin: 0 0 2rem !important;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.lo-reviews #product-reviews > dl > div {
    grid-template-columns: 3.5rem minmax(6rem, 1fr) 2rem !important;
    gap: 0.75rem !important;
}

.lo-reviews #product-reviews progress {
    width: 100% !important;
    height: 0.25rem;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    accent-color: var(--lo-ink);
    background: var(--lo-line);
}

.lo-reviews #product-reviews progress::-webkit-progress-bar { background: var(--lo-line); }
.lo-reviews #product-reviews progress::-webkit-progress-value { background: var(--lo-ink); }
.lo-reviews #product-reviews progress::-moz-progress-bar { background: var(--lo-ink); }

.lo-reviews #product-reviews > form[method="GET"] {
    align-items: end;
    gap: 0.75rem !important;
    margin: 0 0 2rem !important;
    padding: 1rem;
    border: 1px solid var(--lo-line);
    background: #f7f7f7;
}

.lo-reviews #product-reviews:not(:has(> dl)) > form[method="GET"] {
    display: none !important;
}

.lo-reviews #product-reviews > form[method="GET"] label,
.lo-reviews #product-reviews > form[data-review-form] label {
    display: grid;
    gap: 0.45rem;
    color: var(--lo-ink);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.lo-reviews #product-reviews select,
.lo-reviews #product-reviews input:not([type="hidden"]):not([type="radio"]),
.lo-reviews #product-reviews textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--lo-line);
    border-radius: 0;
    background-color: #fff;
    color: var(--lo-ink);
    font: inherit;
    font-size: 0.875rem;
    letter-spacing: normal;
    text-transform: none;
}

.lo-reviews #product-reviews select { min-width: 11rem; }
.lo-reviews #product-reviews textarea { min-height: 8rem; resize: vertical; }

.lo-reviews #product-reviews .sg-review-rating legend {
    margin-bottom: 0.45rem;
    color: var(--lo-ink);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.lo-reviews #product-reviews form[data-review-form] .sg-review-stars {
    display: inline-flex;
    width: max-content;
    align-items: center;
    flex-direction: row-reverse;
    gap: 0;
}

.lo-reviews #product-reviews form[data-review-form] .sg-review-star-label {
    display: grid;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    color: var(--lo-line);
    cursor: pointer;
    font-size: 1.625rem;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
}

.lo-reviews #product-reviews form[data-review-form] .sg-review-star-input:checked ~ .sg-review-star-label {
    color: var(--lo-ink);
}

@media (hover: hover) {
    .lo-reviews #product-reviews form[data-review-form] .sg-review-star-label:hover,
    .lo-reviews #product-reviews form[data-review-form] .sg-review-star-label:hover ~ .sg-review-star-label {
        color: var(--lo-ink);
    }
}

.lo-reviews #product-reviews select:focus-visible,
.lo-reviews #product-reviews input:focus-visible,
.lo-reviews #product-reviews textarea:focus-visible {
    border-color: var(--lo-ink);
}

.lo-reviews #product-reviews button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.75rem;
    border: 1px solid var(--lo-ink);
    background: var(--lo-ink);
    color: #fff;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lo-reviews #product-reviews button[type="submit"]:hover:not(:disabled) { background: #000; }
.lo-reviews #product-reviews button[type="submit"]:disabled { cursor: not-allowed; opacity: 0.45; }

.lo-reviews #product-reviews > article {
    padding: 2rem 0 !important;
    border-color: var(--lo-line) !important;
    overflow-wrap: anywhere;
}

.lo-reviews #product-reviews > article > p { margin-top: 0.75rem; line-height: 1.7; }

.lo-reviews #product-reviews > article > p:first-child {
    margin-top: 0;
    color: var(--lo-ink);
    font-size: 1rem;
    letter-spacing: 0.08em;
}

.lo-reviews #product-reviews > article > p:first-child > span {
    color: var(--lo-ink) !important;
}

.lo-reviews #product-reviews > article > h3 {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500 !important;
}

.lo-reviews #product-reviews > article > aside {
    margin-top: 1.25rem !important;
    padding: 1.25rem !important;
    border-left: 2px solid var(--lo-ink);
    background: #f7f7f7 !important;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.lo-reviews #product-reviews > article > aside strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.lo-reviews #product-reviews > nav {
    align-items: center;
    margin: 1.5rem 0 !important;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.lo-reviews #product-reviews > nav a,
.lo-reviews #product-reviews > p:last-child a {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.lo-reviews #product-reviews > nav a:hover,
.lo-reviews #product-reviews > p:last-child a:hover { text-decoration: none; }

.lo-reviews #product-reviews > form[data-review-form] {
    gap: 1rem !important;
    max-width: 42rem !important;
    margin-top: 2rem;
    padding-top: 2rem !important;
    border-color: var(--lo-line) !important;
}

.lo-reviews #product-reviews > form[data-review-form] > p {
    min-height: 1.25rem;
    color: #5f5f5f;
    font-size: 0.75rem;
}

.lo-reviews #product-reviews > p:last-child:not([aria-label]) {
    margin-top: 1.25rem;
    color: #5f5f5f;
    font-size: 0.8125rem;
}

@media (max-width: 639px) {
    .lo-reviews #product-reviews > form[method="GET"] {
        display: grid;
        align-items: stretch;
    }

    .lo-reviews #product-reviews > form[method="GET"] select,
    .lo-reviews #product-reviews > form[method="GET"] button {
        width: 100%;
    }
}

/* Overlay open/close is driven off one data-state on the overlay root,
   so a panel can never disagree with its own scrim. */
.lo-drawer { transition: transform 0.35s ease; }
.lo-scrim { transition: opacity 0.35s ease; opacity: 1; }

[data-overlay][data-state="closed"] .lo-scrim { opacity: 0; }
[data-overlay][data-state="closed"] .lo-drawer--left { transform: translateX(-100%); }
[data-overlay][data-state="closed"] .lo-drawer--right { transform: translateX(100%); }
[data-overlay][data-state="closed"] .lo-drawer--top { transform: translateY(-100%); }

.lo-prose { line-height: 1.8; }
.lo-prose > * + * { margin-top: 1rem; }
.lo-prose ul { list-style: disc; padding-left: 1.25rem; }
.lo-prose ol { list-style: decimal; padding-left: 1.25rem; }
.lo-prose a { text-decoration: underline; text-underline-offset: 3px; }
.lo-prose h2, .lo-prose h3 { margin-top: 2rem; }

.lo-hero-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.lo-hero-track::-webkit-scrollbar { display: none; }
.lo-hero-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }

.lo-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    color: #111;
    background: rgba(255, 255, 255, 0.82);
    transition: background 0.2s ease;
}
.lo-hero-nav:hover { background: #fff; }

@media (min-width: 640px) {
    .lo-hero-nav { width: 2.5rem; height: 2.5rem; }
}

.lo-hero-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
    transition: background 0.2s ease, width 0.2s ease;
}
.lo-hero-dot[aria-current="true"] { width: 1.25rem; background: #fff; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
