:root {
    color-scheme: light;
    --ink: #212820;
    --muted: #526052;
    --forest: #172117;
    --leaf: #2d583c;
    --line: #dce2d9;
    --surface: #f4f7f2;
    --gold: #f4cb63;
    --gold-hover: #efbe44;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
a { color: var(--leaf); text-underline-offset: .18em; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #437647; outline-offset: 4px; }
[hidden] { display: none !important; }

.shell { width: min(1420px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--forest); color: #fff; }
.site-header .shell { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid #879980;
    border-radius: 11px;
    color: #e2edda;
    font-weight: 700;
    font-size: 22px;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; line-height: 1.18; }
.brand small { margin-top: 3px; color: #c3d4ba; font-size: 11px; }
.header-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 1.2rem; }
.header-link { color: #f0f5ee; font-size: 13px; font-weight: 600; }
.header-link:focus-visible, .brand:focus-visible { outline-color: #d6e7cc; }

.breadcrumb { margin-block: 25px 20px; }
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 9px;
    padding: 0;
    margin: 0;
    list-style: none;
    color: var(--muted);
    font-size: 13px;
}
.breadcrumb li + li::before { content: "›"; margin-right: 9px; color: #6a7769; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr) minmax(225px, .69fr);
    align-items: start;
    gap: clamp(20px, 2.3vw, 36px);
    margin-bottom: 48px;
}

.gallery {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}
.thumbs { grid-column: 1; grid-row: 1; display: grid; gap: 9px; }
.thumb {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 60px;
    height: 60px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}
.thumb:hover { border-color: #719178; }
.thumb[aria-pressed="true"] { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 5px; }
.gallery figure { grid-column: 2; grid-row: 1; min-width: 0; margin: 0; }
.gallery-stage {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8f9f7;
}
.gallery-stage > img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: clamp(12px, 2vw, 24px);
}
.image-button {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}
.image-button:hover { background: var(--surface); }
.zoom { position: absolute; top: 10px; right: 10px; }
.gallery figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; }
.photo-note { display: block; margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.product-intro { grid-column: 2; grid-row: 1; }
.product-intro h1 {
    margin: 3px 0 4px;
    color: #1a241a;
    font-size: clamp(29px, 2.9vw, 42px);
    line-height: 1.13;
    letter-spacing: -.04em;
}
.seller { display: inline-block; margin-block: 5px 17px; font-size: 13px; font-weight: 600; }
.price-section { padding-block: 15px 0; border-top: 1px solid var(--line); }
.price {
    display: block;
    font-variant-numeric: tabular-nums;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.15;
}
.condition { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.condition strong { color: var(--ink); }
.summary { margin: 15px 0 0; color: var(--muted); font-size: 14px; }

.order-card {
    grid-column: 3;
    grid-row: 1 / span 2;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.order-card .price { font-size: 29px; }
.order-card h2 { margin: 17px 0 4px; font-size: 15px; color: var(--leaf); }
.order-card p { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.actions { display: grid; gap: 9px; }
.action {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 7px 9px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
.action:hover { background: var(--surface); border-color: #b1c1ad; }
.action-primary { border-color: var(--gold); background: var(--gold); }
.action-primary:hover { border-color: var(--gold-hover); background: var(--gold-hover); }
.store-location { padding-top: 13px; margin-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.store-location strong { display: block; color: var(--ink); font-weight: 600; }

.details { grid-column: 2; grid-row: 2; border-top: 1px solid var(--line); padding-top: 15px; }
.details h2 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.02em; }
.specs { margin: 0; font-size: 13px; }
.specs div { display: grid; grid-template-columns: minmax(92px, .85fr) minmax(0, 1.15fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs dt { font-weight: 600; }
.specs dd { margin: 0; color: var(--muted); }

.site-footer { padding-block: 22px 26px; border-top: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted); }
.site-footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 12px 24px; }
.site-footer p { margin: 0; }

.lightbox {
    width: min(880px, calc(100% - 24px));
    max-height: calc(100% - 24px);
    padding: 12px;
    border: 0;
    border-radius: 14px;
    color: var(--ink);
    background: #fff;
}
.lightbox::backdrop { background: rgba(15, 23, 17, .8); }
.lightbox-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lightbox-toolbar p { flex: 1; margin: 0 6px 0 3px; font-size: 14px; font-weight: 600; }
.lightbox-stage { background: #f8f9f7; border-radius: 8px; overflow: hidden; }
.lightbox-stage img { display: block; width: 100%; height: min(67vh, 670px); padding: 10px; object-fit: contain; }

@media (min-width: 1051px) {
    .product-grid { grid-template-rows: auto 1fr; row-gap: 20px; }
}
@media (max-width: 1050px) {
    .shell { width: calc(100% - 40px); }
    .product-grid { grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr); }
    .gallery { grid-row: 1 / span 2; }
    .order-card { grid-column: 2; grid-row: 2; }
    .details { grid-column: 2; grid-row: 3; }
}
@media (max-width: 680px) {
    .shell { width: calc(100% - 32px); }
    .site-header .shell { min-height: 62px; gap: 10px; }
    .brand { gap: 8px; }
    .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
    .brand strong { font-size: 15px; }
    .header-links { column-gap: .75rem; }
    .brand small, .header-link { font-size: 11px; }
    .breadcrumb { margin-block: 17px 15px; }
    .product-grid { display: flex; flex-direction: column; gap: 21px; margin-bottom: 32px; }
    .product-grid > * { width: 100%; }
    .gallery { display: flex; flex-direction: column; gap: 11px; }
    .gallery figure { order: -1; width: 100%; }
    .gallery-stage { aspect-ratio: 1.22 / 1; }
    .gallery-stage > img { aspect-ratio: 1.22 / 1; }
    .thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
    .thumb { width: 52px; height: 52px; }
    .product-intro .seller { margin-bottom: 11px; }
    .price-section { padding-top: 11px; }
    .order-card { padding: 15px; }
}
