:root {
    color-scheme: light;
    --bg: #edf1f4;
    --surface: #ffffff;
    --surface-soft: #f6f8fa;
    --ink: #252b34;
    --ink-strong: #11151a;
    --muted: #687384;
    --line: #d3dae2;
    --line-soft: #e9edf1;
    --accent: #137a70;
    --accent-ink: #0b554f;
    --accent-soft: #ddf3ee;
    --rose: #ae3f68;
    --amber: #9c6100;
    --charcoal: #1b2027;
    --shadow: 0 12px 30px rgb(19 28 38 / 9%);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgb(35 50 64 / 3.4%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(35 50 64 / 3.4%) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--ink);
    font: 14px/1.45 "Avenir Next", "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-feature-settings: "tnum" 1, "ss01" 1;
}

body::before {
    position: fixed;
    z-index: 20;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #1b9b90 0 44%, #c54d76 44% 72%, #d89a2b 72% 100%);
    content: "";
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.site-header {
    background: var(--charcoal);
    border-bottom: 1px solid #101419;
    color: #f8fafc;
    box-shadow: 0 7px 22px rgb(16 24 32 / 16%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 36px, 1320px);
    min-height: 78px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 42px;
    height: 50px;
    flex: 0 0 auto;
    border: 1px solid rgb(255 255 255 / 68%);
    border-radius: 6px;
    background: #f8fafb;
    box-shadow: 3px 3px 0 var(--accent);
    transform: rotate(-2deg);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 18px;
    font-weight: 850;
    line-height: 1.15;
}

.brand small {
    margin-top: 2px;
    color: #aab4c3;
    font-size: 12px;
}

.store-nav {
    display: flex;
    align-items: center;
}

.store-nav a {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 6px;
    color: #cbd2dc;
    font-weight: 720;
    text-decoration: none;
}

.store-nav a:hover,
.store-nav a[aria-current="page"] {
    background: rgb(255 255 255 / 10%);
    color: #fff;
}

main {
    width: min(100% - 36px, 1320px);
    min-height: calc(100vh - 176px);
    margin: 0 auto;
    padding: 30px 0 52px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    color: var(--accent-ink);
    font-size: 11px;
    font-weight: 830;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 18px;
    height: 3px;
    background: var(--rose);
    content: "";
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    color: var(--ink-strong);
    font-family: "Avenir Next", "Segoe UI Variable Display", system-ui, sans-serif;
}

.store-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0 24px;
}

.store-intro h1 {
    margin: 0;
    font-size: 38px;
    font-weight: 850;
    line-height: 1.08;
}

.store-intro p:last-child {
    max-width: 660px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.stock-count {
    flex: 0 0 auto;
    margin-bottom: 3px;
    padding: 7px 10px;
    border: 1px solid #b9ddd7;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 780;
}

.catalogue-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(150px, .8fr) minmax(140px, .7fr) minmax(150px, .7fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.catalogue-filters label,
.price-filter label {
    min-width: 0;
}

.catalogue-filters label > span,
.price-filter label > span {
    display: block;
    margin: 0 0 5px;
    color: #465467;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

input,
select {
    width: 100%;
    min-height: 43px;
    border: 1px solid #c7d0da;
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: var(--ink-strong);
    padding: 9px 11px;
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(19 122 112 / 14%);
}

input::placeholder {
    color: #919aa6;
}

.price-filter {
    grid-column: 1 / -1;
    grid-row: 2;
    border-top: 1px solid var(--line-soft);
    padding-top: 10px;
}

.catalogue-filters > .button {
    grid-column: 5;
    grid-row: 1;
}

.price-filter summary {
    width: fit-content;
    color: var(--accent-ink);
    cursor: pointer;
    font-size: 12px;
    font-weight: 780;
}

.price-filter > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 180px));
    gap: 10px;
    margin-top: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 15px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 14px rgb(19 122 112 / 17%);
}

.button-primary:hover {
    border-color: var(--accent-ink);
    background: var(--accent-ink);
}

.button-disabled {
    border-color: var(--line);
    background: var(--surface-soft);
    color: var(--muted);
    cursor: default;
}

.button-wide {
    width: 100%;
    min-height: 50px;
}

.clear-link {
    align-self: center;
    justify-self: start;
    color: var(--muted);
    font-size: 12px;
    font-weight: 730;
}

.catalogue-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 25px 0 12px;
}

.catalogue-heading h2 {
    margin: 0;
    font-size: 20px;
}

.catalogue-heading span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 7px 20px rgb(25 34 44 / 6%);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.product-card:hover {
    border-color: #aeb9c5;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-image {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 5 / 7;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #e7ece9;
}

.card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 720;
    text-align: center;
}

.condition-chip {
    position: absolute;
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    overflow: hidden;
    padding: 4px 7px;
    border: 1px solid rgb(255 255 255 / 72%);
    border-radius: 999px;
    background: rgb(27 32 39 / 88%);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-copy {
    display: flex;
    min-height: 168px;
    flex-direction: column;
    padding: 13px;
}

.card-copy p {
    margin: 0 0 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 690;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-copy h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 820;
    line-height: 1.25;
}

.card-copy h3 a {
    text-decoration: none;
}

.card-copy small {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    color: #667181;
    font-size: 11px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}

.card-footer strong {
    color: var(--accent-ink);
    font-size: 19px;
    font-weight: 850;
}

.card-footer a {
    color: var(--accent-ink);
    font-size: 11px;
    font-weight: 800;
}

.store-message {
    max-width: 720px;
    margin: 70px auto;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}

.store-message.compact {
    margin-top: 28px;
}

.store-message .eyebrow {
    justify-content: center;
}

.store-message h1,
.store-message h2 {
    margin: 0;
    font-size: 28px;
}

.store-message p {
    margin: 10px auto 20px;
    color: var(--muted);
    font-size: 15px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 690;
}

.breadcrumbs a {
    color: var(--accent-ink);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(300px, 590px) minmax(300px, 470px);
    gap: clamp(30px, 6vw, 86px);
    justify-content: center;
    align-items: start;
}

.product-gallery {
    min-width: 0;
}

.product-image-button {
    display: grid;
    width: 100%;
    aspect-ratio: 5 / 7;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #e7ece9;
    box-shadow: var(--shadow);
    cursor: zoom-in;
}

.product-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.side-switch {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    width: min(100%, 260px);
    margin: 12px auto 0;
    padding: 3px;
    border: 1px solid var(--charcoal);
    border-radius: 8px;
    background: var(--charcoal);
}

.side-switch button {
    min-height: 37px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #c5ccd5;
    font-weight: 800;
    cursor: pointer;
}

.side-switch button[aria-pressed="true"] {
    background: #fff;
    color: var(--accent-ink);
}

.product-copy {
    position: sticky;
    top: 24px;
    padding-top: 16px;
}

.product-copy h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 850;
    line-height: 1.08;
}

.collector-line {
    margin: 10px 0 22px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 680;
}

.product-price {
    display: block;
    color: var(--accent-ink);
    font-size: 32px;
    font-weight: 850;
}

.product-facts {
    margin: 24px 0 18px;
    border-top: 1px solid var(--line);
}

.product-facts div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.product-facts dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 720;
}

.product-facts dd {
    margin: 0;
    color: var(--ink-strong);
    font-weight: 780;
}

.copy-note {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
}

.image-dialog {
    width: min(92vw, 760px);
    max-height: 94vh;
    overflow: hidden;
    padding: 12px;
    border: 1px solid rgb(255 255 255 / 40%);
    border-radius: 8px;
    background: #fff;
}

.image-dialog::backdrop {
    background: rgb(8 13 18 / 82%);
}

.image-dialog img {
    display: block;
    width: 100%;
    height: calc(94vh - 24px);
    object-fit: contain;
}

.dialog-close {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 18px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: 50%;
    background: rgb(27 32 39 / 88%);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 98px;
    padding: 24px max(18px, calc((100% - 1320px) / 2));
    border-top: 1px solid #101419;
    background: var(--charcoal);
    color: #f8fafc;
}

.site-footer strong {
    font-size: 15px;
}

.site-footer span {
    color: #aab4c3;
    font-size: 12px;
}

@media (max-width: 1120px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .catalogue-filters {
        grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(135px, .7fr));
    }

    .catalogue-filters > .button {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .price-filter {
        grid-row: auto;
    }
}

@media (max-width: 860px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .catalogue-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-field {
        grid-column: 1 / -1;
    }

    .product-detail {
        grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
        gap: 28px;
    }

    .product-copy h1 {
        font-size: 30px;
    }
}

@media (max-width: 640px) {
    .header-inner,
    main {
        width: min(100% - 24px, 1320px);
    }

    .header-inner {
        min-height: 70px;
    }

    .brand-mark {
        width: 36px;
        height: 43px;
        font-size: 13px;
    }

    .brand strong {
        font-size: 16px;
    }

    .brand small {
        font-size: 10px;
    }

    .store-nav a {
        padding: 8px;
        font-size: 12px;
    }

    main {
        min-height: calc(100vh - 154px);
        padding-top: 20px;
    }

    .store-intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding-bottom: 18px;
    }

    .store-intro h1 {
        font-size: 31px;
    }

    .store-intro p:last-child {
        font-size: 14px;
    }

    .stock-count {
        margin: 0;
    }

    .catalogue-filters {
        gap: 10px;
        padding: 12px;
    }

    .catalogue-filters > label,
    .catalogue-filters > .button,
    .price-filter {
        align-self: end;
    }

    .catalogue-filters input,
    .catalogue-filters select,
    .catalogue-filters > .button,
    .price-filter summary {
        height: 43px;
        min-height: 43px;
    }

    .price-filter {
        grid-column: auto;
        border-top: 0;
        padding-top: 0;
    }

    .price-filter summary {
        display: flex;
        width: 100%;
        align-items: center;
        padding: 9px 11px;
        border: 1px solid #c7d0da;
        border-radius: 6px;
        background: #fff;
    }

    .price-filter[open] {
        grid-column: 1 / -1;
    }

    .price-filter[open] > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalogue-filters label > span,
    .price-filter label > span {
        font-size: 10px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .card-copy {
        min-height: 157px;
        padding: 11px;
    }

    .card-copy h3 {
        font-size: 14px;
    }

    .card-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .card-footer strong {
        font-size: 17px;
    }

    .product-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-gallery {
        width: min(100%, 520px);
        margin: 0 auto;
    }

    .product-copy {
        position: static;
        padding-top: 0;
    }

    .product-copy h1 {
        font-size: 30px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        min-height: 84px;
        padding: 20px 12px;
    }
}

@media (max-width: 390px) {
    .catalogue-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-field,
    .catalogue-filters > .button,
    .price-filter {
        grid-column: auto;
    }

    .price-filter > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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