:root {
    --paper: var(--brand-ivory);
    --white: var(--brand-white);
    --ink: var(--brand-charcoal);
    --muted: var(--brand-muted);
    --accent: var(--brand-walnut);
    --line: var(--brand-taupe);
    --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.55 Inter, system-ui, sans-serif;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.shop-shell { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
.shop-header { border-bottom: 1px solid var(--line); }
.shop-header-inner { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.shop-logo { display: block; width: 8.2rem; max-width: 100%; height: auto; }
.shop-header-links { display: flex; align-items: center; gap: 1.5rem; }
.shop-header-links a { color: var(--ink); font-weight: 650; text-decoration: none; }
.shop-header-links a:hover { color: var(--accent); }
.shop-cart-link { border: 1px solid var(--line); border-radius: 2rem; padding: .45rem 1rem; }

.shop-main { flex: 1; padding-block: clamp(2rem, 5vw, 4.5rem) 5rem; }
.shop-footer { border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.shop-footer a { color: inherit; }

h1, h2, p { margin-top: 0; }
h1 {
    margin-bottom: 1rem;
    font: 400 clamp(2.6rem, 6vw, 4.8rem)/1.04 var(--serif);
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}
h2 { margin-bottom: .75rem; font-weight: 650; font-size: 1.2rem; line-height: 1.3; }

.shop-catalog-heading p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); max-width: 36rem; }
.shop-filters { display: flex; flex-wrap: wrap; gap: .55rem; margin: 2rem 0 1.7rem; }
.shop-filters a {
    padding: .5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 2rem;
    color: var(--ink);
    text-decoration: none;
    font-size: .9rem;
    overflow-wrap: anywhere;
    min-width: 0;
}
.shop-filters a:hover { border-color: var(--accent); }
.shop-filters a[aria-current="page"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.2rem; list-style: none; padding: 0; }
.shop-card { display: block; color: inherit; text-decoration: none; }
.shop-card:hover h2 { color: var(--accent); text-decoration: underline; }
.shop-media {
    position: relative;
    aspect-ratio: var(--product-image-ratio);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--brand-sand);
    color: var(--muted);
    text-align: center;
}
.shop-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.shop-media > span { font: 1.25rem var(--serif); overflow-wrap: anywhere; padding: 1rem; }
.shop-card-info { display: flex; gap: .75rem; justify-content: space-between; align-items: baseline; margin-top: .85rem; }
.shop-card-info small { color: var(--muted); }
.shop-card-info h2 { font: 1.4rem/1.2 var(--serif); margin: .18rem 0 0; overflow-wrap: anywhere; }
.shop-card-info > span { white-space: nowrap; font-size: .9rem; font-weight: 650; }

.shop-back { display: inline-block; margin-bottom: 1.25rem; font-size: .95rem; text-decoration: none; }
.shop-back:hover { text-decoration: underline; }
.shop-product { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.shop-product-info { padding-top: 1rem; }
.shop-price { font-size: 1.2rem; font-weight: 650; }
.shop-description { margin-bottom: 2rem; white-space: pre-wrap; color: var(--muted); overflow-wrap: anywhere; }

.shop-button {
    display: inline-flex;
    min-height: 2.8rem;
    justify-content: center;
    align-items: center;
    padding: .65rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: var(--brand-charcoal);
    color: var(--brand-white);
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}
.shop-button:hover { background: var(--brand-walnut); }
.shop-empty { padding: clamp(1.5rem, 5vw, 3rem); margin-top: 2rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); }
.shop-empty p { color: var(--muted); }
.shop-empty p:last-child { margin-bottom: 0; }
.shop-notice { border-radius: var(--radius-control); padding: .7rem 1rem; border-left: 3px solid var(--accent); background: var(--white); }

.shop-two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; margin-top: 1.75rem; }
.shop-lines, .shop-summary-items { list-style: none; margin: 0; padding: 0; }
.shop-line { border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1rem 0; }
.shop-line:last-child { border-bottom: 1px solid var(--line); }
.shop-line-product { display: grid; min-width: 0; }
.shop-line-product:has(.shop-line-image) { grid-template-columns: clamp(4rem, 9vw, 7rem) minmax(0, 1fr); gap: .75rem; align-items: start; }
.shop-line-image {
    position: relative;
    aspect-ratio: var(--product-image-ratio);
    border-radius: var(--radius-control);
    overflow: hidden;
    background: var(--brand-sand);
}
.shop-line-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop-line-copy { display: grid; overflow-wrap: anywhere; }
.shop-line-product span { color: var(--muted); font-size: .9rem; }
.shop-line-name { color: var(--ink); font-weight: 650; }
.shop-line-controls, .shop-line-controls form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.shop-line-controls input { width: 3.8rem; padding: .35rem; }
.shop-line > .shop-line-controls { grid-column: 1 / -1; grid-row: 2; }
.shop-line-total { grid-column: 2; grid-row: 1; text-align: right; }
.shop-link-button { border-radius: var(--radius-control); background: transparent; padding: .35rem; border: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

.shop-summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 1.25rem; }
.shop-summary p { color: var(--muted); font-size: .9rem; }
.shop-summary .shop-button { width: 100%; }
.shop-summary-items { padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.shop-summary-items li, .shop-summary dl > div, .shop-confirmation dl > div { display: flex; justify-content: space-between; gap: 1rem; margin-block: .35rem; }
.shop-summary-items li > :first-child { overflow-wrap: anywhere; }
.shop-summary-items li > :last-child, .shop-summary dd { white-space: nowrap; }
.shop-summary dd, .shop-confirmation dd { margin: 0; }
.shop-confirmation dl { max-width: 25rem; margin: 1.5rem 0; }
.shop-confirmation dd { font-weight: 650; }

.shop-form { display: grid; gap: .35rem; }
.shop-form label { font-weight: 650; margin-top: .5rem; }
.shop-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.shop-form-row > div { display: grid; gap: .35rem; }
.shop-form input, .shop-form select, .shop-form textarea, .shop-line-controls input {
    min-width: 0;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--brand-taupe);
    border-radius: var(--radius-control);
    font: inherit;
}
.shop-form input, .shop-form select, .shop-form textarea { width: 100%; padding: .55rem .65rem; }
.shop-form textarea { resize: vertical; }
.shop-errors, .field-validation-error { color: #991c32; }
.validation-summary-valid, .field-validation-valid { display: none; }

.shop-hidden, .shop-skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.shop-skip:focus { position: fixed; z-index: 1; top: .5rem; left: .5rem; background: var(--white); padding: .5rem; }

@media (max-width: 53rem) {
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shop-two-column { grid-template-columns: 1fr; }
}
@media (max-width: 35rem) {
    .shop-shell { width: calc(100% - 2rem); }
    .shop-grid, .shop-product, .shop-form-row { grid-template-columns: 1fr; }
    .shop-header-links { gap: .8rem; }
}

.shop-configurator {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "preview details" "preview options";
    gap: 1.15rem clamp(1.8rem, 5vw, 4rem);
    align-items: start;
}
.shop-configurator-details { grid-area: details; }
.shop-configurator-details .shop-description { margin-bottom: 0; }
.shop-configurator-options { grid-area: options; }
.shop-configurator-preview { grid-area: preview; position: sticky; top: 1.5rem; }
.shop-ornaments { margin: .65rem 0; padding: 0; border: 0; min-width: 0; }
.shop-ornaments legend { font-weight: 650; }
.shop-ornament-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.25rem), 1fr));
    gap: .4rem;
}
.shop-form .shop-ornament {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    margin: 0;
    padding: .35rem .5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    cursor: pointer;
}
.shop-form .shop-ornament:has(:checked) { border-color: var(--brand-charcoal); background: var(--brand-sand); }
.shop-form .shop-ornament:has(:disabled) { opacity: .55; cursor: default; }
.shop-form .shop-ornament input { width: auto; margin: 0; }
.shop-ornament svg { flex: none; }
.shop-helper { margin: .1rem 0 .35rem; color: var(--muted); font-size: .9rem; }
.shop-review { display: flex; align-items: flex-start; gap: .55rem; font-weight: 500 !important; margin: .8rem 0 .3rem; }
.shop-form .shop-review input { width: auto; margin-top: .35em; }
.shop-button:disabled { border-color: var(--line); background: var(--brand-sand); color: var(--muted); cursor: default; }
.shop-album-photos { border-block: 1px solid var(--line); margin-top: .65rem; padding-block: 1rem .6rem; }
.shop-album-photos ol { display: grid; gap: .65rem; list-style: none; margin: .6rem 0 0; padding: 0; }
.shop-album-photos li { display: grid; grid-template-columns: 2.8rem 1fr auto; gap: .5rem; align-items: center; font-size: .86rem; }
.shop-album-photos li img { width: 2.8rem; height: 2.8rem; border-radius: var(--radius-control); object-fit: cover; background: var(--brand-sand); }
.shop-album-photos li > span { overflow-wrap: anywhere; }
.shop-photo-actions { display: flex; flex-wrap: wrap; }
.shop-photo-actions button:disabled { color: var(--brand-taupe); cursor: default; }

@media (max-width: 46rem) {
    .shop-configurator {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "details" "preview" "options";
        gap: .95rem;
    }
    .shop-configurator-details .shop-price { margin-bottom: .55rem; }
    .shop-configurator-preview { position: static; }
}

.shop-summary-items small { display: block; color: var(--muted); }

.shop-product-gallery { min-width: 0; }
.shop-configurator-preview > :is(.shop-product-gallery, .shop-media) { margin-bottom: 1.25rem; }
.shop-gallery-stage { display: grid; gap: .75rem; }
.shop-gallery-slide {
    position: relative;
    aspect-ratio: var(--product-image-ratio);
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--store-panel);
}
.shop-gallery-slide img, .shop-gallery-slide video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}
.shop-gallery-slide video { background: var(--brand-charcoal); }
.shop-gallery-controls {
    display: flex;
    align-items: start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .75rem;
}
.shop-gallery-thumbnails { display: flex; flex-wrap: wrap; gap: .4rem; }
.shop-gallery-thumbnail, .shop-gallery-arrow {
    position: relative;
    padding: 0;
    border: 1px solid var(--store-line);
    border-radius: var(--radius-control);
    background: var(--store-paper);
    color: var(--store-text);
    cursor: pointer;
}
.shop-gallery-thumbnail {
    display: grid;
    place-items: center;
    width: clamp(2.75rem, 6vw, 3.75rem);
    aspect-ratio: var(--product-image-ratio);
    overflow: hidden;
}
.shop-gallery-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.shop-gallery-thumbnail[aria-pressed="true"] {
    border: 2px solid var(--store-accent);
}
.shop-gallery-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--brand-charcoal) 54%, transparent);
    color: white;
}
.shop-gallery-navigation { display: flex; align-items: center; gap: .5rem; }
.shop-gallery-arrow { width: 2.75rem; height: 2.75rem; font: inherit; }
.shop-gallery-count { min-width: 2.75rem; text-align: center; color: var(--store-muted); font-size: .8rem; }

.shop-customer-photo-list {
    margin: 0;
    padding-inline-start: 1.5rem;
}

.shop-customer-photo-list:empty {
    display: none;
}

.shop-customer-photo-list li {
    padding: .35rem 0;
    overflow-wrap: anywhere;
}

.shop-customer-photo-list li div {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
