/* CHERTOVSKI storefront. One design system for every page, including the
   byte-pinned offer.html and privacy.html: their markup cannot change, so the
   logo, header and footer are drawn from CSS alone. */
:root {
  color-scheme: light;
  --paper: #f7f3ee;
  --surface: #fffdf9;
  --tint: #efe8e1;
  --white: #fff;
  --ink: #211816;
  --muted: #6d605a;
  --line: #ddd2c9;
  --wine: #6b0909;
  --wine-deep: #4c0606;
  --accent: var(--wine);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(16px, 4.5vw, 72px);
  /* Seal geometry: a burgundy seal on a paper medallion hanging below the bar. */
  --header-h: 84px;
  --seal-w: 112px;
  --seal-top: 9px;
  --tab-w: 164px;
  --tab-h: 170px;
  --tab-r: 64px;
  --seal-compact-w: 58px;
  --seal-overhang: calc(var(--tab-h) - var(--header-h));
  --page-top: calc(var(--seal-overhang) + 22px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button, input, select, textarea { font: inherit; }
input, select, textarea { font-size: 1rem; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
::selection { background: #e9cfcf; color: var(--wine-deep); }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.06; letter-spacing: -.018em; overflow-wrap: break-word; }
h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.75rem); }
h3 { font-weight: 600; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 100; top: 10px; left: 10px; padding: .75rem 1rem; background: var(--surface); color: var(--ink); }
.shell { width: min(1400px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow, .caption { font-size: .72rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; }
.accent { color: var(--wine); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { width: calc(100% - 2 * clamp(16px, 3vw, 48px)); min-height: var(--header-h); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(16px, 2vw, 32px); }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 2vw, 34px); }
.site-nav a { position: relative; padding-block: .7rem; font-size: .93rem; font-weight: 500; letter-spacing: .012em; white-space: nowrap; }
/* The first two links sit left of the seal, the last two right of it. */
.site-nav a:nth-child(3) { margin-left: auto; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: .35rem; height: 1px; background: var(--wine); transition: right .22s ease; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--wine); }
.site-nav a:hover::after, .site-nav a[aria-current]::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: .35rem; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 44px; min-height: 44px; }
.icon-link:hover { color: var(--wine); }
.icon-link svg, .search-field svg { width: 22px; height: 22px; flex: none; }
.cart-link span { min-width: 12px; font-size: .72rem; font-variant-numeric: tabular-nums; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: inherit; place-items: center; }
.menu-toggle > span:first-child { position: relative; display: block; width: 22px; height: 10px; }
.menu-toggle > span:first-child::before, .menu-toggle > span:first-child::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .2s ease, top .2s ease; }
.menu-toggle > span:first-child::before { top: 0; }
.menu-toggle > span:first-child::after { top: 8.5px; }
.menu-toggle[aria-expanded="true"] > span:first-child::before { top: 4px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] > span:first-child::after { top: 4px; transform: rotate(-45deg); }

/* The seal. The box is the medallion, so only the visible shape takes clicks. */
.wordmark { display: block; }
.header-logo { position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); width: var(--tab-w); height: var(--tab-h); background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--tab-r) var(--tab-r); transition: width .28s ease, height .28s ease, border-radius .28s ease, background-color .28s ease, border-color .28s ease; }
.header-logo::before, .footer-logo::before { content: ""; position: absolute; aspect-ratio: 722 / 865; background: var(--wine); -webkit-mask: url("brand-seal.png") center / contain no-repeat; mask: url("brand-seal.png") center / contain no-repeat; }
.header-logo::before { top: var(--seal-top); left: 50%; width: var(--seal-w); transform: translateX(-50%); transition: width .28s ease, top .28s ease; }
.header-logo:hover::before, .footer-logo:hover::before { background: var(--wine-deep); }
.header-logo img, .footer-logo img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.site-header.is-compact .header-logo, .site-header.is-menu-open .header-logo { width: calc(var(--seal-compact-w) + 16px); height: calc(var(--header-h) - 1px); background: transparent; border-color: transparent; border-radius: 0; }
.site-header.is-compact .header-logo::before, .site-header.is-menu-open .header-logo::before { top: 4px; width: var(--seal-compact-w); }

.button { max-width: 100%; overflow-wrap: anywhere; text-align: left; border: 1px solid currentColor; display: inline-flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.3rem; min-height: 50px; background: transparent; color: inherit; font-size: .86rem; font-weight: 600; letter-spacing: .025em; line-height: 1.25; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
.button:hover { color: var(--wine); }
.button-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.button-dark, button.button[type="submit"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.button-dark:hover, button.button[type="submit"]:hover:not(:disabled) { background: var(--wine); border-color: var(--wine); color: var(--white); }
button:disabled { opacity: .5; cursor: not-allowed; }
.section-spacing { padding-block: clamp(56px, 8vw, 120px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(20px, 3vw, 40px); }
.section-heading .eyebrow, .page-head .eyebrow { margin-bottom: .75rem; }
.section-heading h2 { font-size: clamp(1.8rem, 3.2vw, 3rem); }
.text-link { display: inline-block; font-size: .86rem; font-weight: 600; border-bottom: 1px solid; padding-bottom: 2px; }
.text-link:hover { color: var(--wine); }

/* Product grid and cards */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(26px, 3.2vw, 48px) clamp(12px, 1.9vw, 28px); }
.featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card { min-width: 0; }
.product-photo, .detail-main-photo { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden; background: var(--tint); }
.product-photo img { height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .6s cubic-bezier(.2, .65, .25, 1), opacity .35s ease; }
.product-photo:hover img:first-child { transform: scale(1.035); }
.product-photo .alt-photo { position: absolute; inset: 0; opacity: 0; }
.product-photo:hover .alt-photo.is-ready { opacity: 1; }
.image-empty { display: grid; place-items: end center; width: 100%; height: 100%; position: relative; padding: 1rem; font: .78rem var(--serif); letter-spacing: .14em; color: var(--muted); }
.image-empty::before { content: ""; position: absolute; top: 50%; left: 50%; width: min(42%, 120px); aspect-ratio: 722 / 865; transform: translate(-50%, -50%); background: var(--wine); opacity: .28; -webkit-mask: url("brand-seal.png") center / contain no-repeat; mask: url("brand-seal.png") center / contain no-repeat; }
.product-copy { display: grid; gap: .28rem; padding-top: .9rem; }
.product-copy .caption { font-size: .64rem; color: var(--wine); letter-spacing: .13em; }
.product-title { overflow-wrap: anywhere; font-size: .98rem; line-height: 1.35; }
.product-title:hover { color: var(--wine); }
.price { font-size: .9rem; color: var(--ink); }
.price:empty { display: none; }
.product-sizes { font-size: .76rem; color: var(--muted); letter-spacing: .02em; }
.product-sizes:empty { display: none; }
.product-sizes.is-stock { color: var(--wine); }

/* Footer */
.site-footer { padding-top: clamp(44px, 6vw, 88px); background: var(--tint); color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.footer-grid nav { display: grid; align-content: start; gap: .25rem; font-size: .9rem; }
.footer-grid nav a { padding-block: .3rem; overflow-wrap: anywhere; }
.footer-grid nav a:hover { color: var(--wine); }
.footer-logo { position: relative; width: 112px; aspect-ratio: 722 / 865; }
.footer-logo::before { inset: 0; }
.footer-tag { margin-top: 1rem; color: var(--muted); font-size: .88rem; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid #cfc3bb; padding-block: 1.4rem; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* Catalog */
.page-head { padding-top: var(--page-top); margin-bottom: clamp(22px, 3vw, 44px); }
.page-head p:not(.eyebrow) { margin-top: .9rem; }
.catalog-page { padding-bottom: clamp(56px, 8vw, 120px); }
.category-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.category-nav a { padding: .55rem .9rem; border: 1px solid var(--line); font-size: .84rem; white-space: nowrap; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.category-nav a:hover { border-color: var(--wine); color: var(--wine); }
.category-nav [aria-current], .category-nav [aria-current]:hover { background: var(--wine); border-color: var(--wine); color: var(--white); }
.filter-bar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, auto) minmax(170px, auto) auto; gap: .6rem; align-items: center; margin-bottom: 1rem; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea { width: 100%; min-width: 0; min-height: 46px; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--wine); }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-field input[type="search"] { padding-left: 2.4rem; }
.catalog-count { font-size: .84rem; white-space: nowrap; padding-inline: .4rem; }
.catalog-note { margin-bottom: clamp(20px, 3vw, 36px); color: var(--muted); font-size: .86rem; }
.catalog-note a { color: var(--wine); text-decoration: underline; text-underline-offset: .18em; }
.catalog-empty { display: grid; justify-items: start; gap: 1rem; padding-block: clamp(2rem, 6vw, 4.5rem); }
.catalog-empty p { font: clamp(1.3rem, 2.4vw, 2rem)/1.2 var(--serif); max-width: 30ch; }

/* Product detail */
.detail-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.25rem; padding-block: 1.7rem 2.8rem; font-size: .82rem; color: var(--muted); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .45rem; }
.breadcrumbs a:hover, .back-link:hover { color: var(--wine); }
.breadcrumbs a + a::before { content: "/"; margin-right: .45rem; }
.back-link { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr); gap: clamp(26px, 6vw, 88px); padding-bottom: clamp(2rem, 5vw, 4rem); align-items: start; }
.detail-main-photo { aspect-ratio: 4 / 5; }
.detail-main-photo:has(.image-empty) { aspect-ratio: 3 / 2; }
.detail-main-photo img { height: 100%; object-fit: contain; }
.detail-content h1 { font-size: clamp(2rem, 3.8vw, 3.6rem); margin: .55rem 0 .8rem; }
.detail-price { font-size: 1.3rem; margin-bottom: 1.5rem; }
.thumb-list { display: flex; gap: .5rem; overflow-x: auto; padding: .6rem 2px; scrollbar-width: thin; }
.thumb-list:empty { display: none; }
.thumb { width: clamp(56px, 12%, 82px); flex: 0 0 auto; aspect-ratio: 3 / 4; border: 1px solid transparent; padding: 2px; background: none; }
.thumb:hover { border-color: var(--line); }
.thumb[aria-pressed="true"] { border-color: var(--wine); }
.thumb img { height: 100%; object-fit: cover; }
.purchase-modes { padding: 0; margin: 0 0 .75rem; border: 0; display: grid; gap: .5rem; }
.purchase-modes legend { padding: 0; margin-bottom: .55rem; font-size: .8rem; font-weight: 650; letter-spacing: .02em; }
.mode-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; padding: .85rem .95rem; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.mode-card:hover { border-color: #b9a79b; }
.mode-card:has(input:checked) { border-color: var(--wine); box-shadow: inset 0 0 0 1px var(--wine); }
.mode-card input { margin: .22rem 0 0; width: 17px; height: 17px; }
.mode-card strong { display: block; font-weight: 600; font-size: .96rem; }
.mode-card small { display: block; margin-top: .15rem; color: var(--muted); font-size: .82rem; line-height: 1.42; }
.mode-note { position: relative; min-height: 1.5em; margin-bottom: 1rem; padding-left: 1rem; font-size: .84rem; color: var(--muted); }
.mode-note::before { content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: #b9a79b; }
.mode-note[data-state="ok"] { color: #2c5a35; }
.mode-note[data-state="ok"]::before { background: #2c7a3d; }
.mode-note[data-state="none"] { color: var(--wine); }
.mode-note[data-state="none"]::before { background: var(--wine); }
.variant-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: .6rem; }
.field { min-width: 0; display: grid; gap: .34rem; font-size: .86rem; align-content: start; }
.size-link { margin-block: .8rem; }
.add-button { width: 100%; }
.product-feedback { min-height: 1.6em; color: var(--wine); padding-block: .45rem; font-size: .84rem; }
.product-feedback a { text-decoration: underline; }
.product-help { margin-bottom: 1.1rem; font-size: .84rem; color: var(--muted); }
.product-help a { color: var(--wine); text-decoration: underline; text-underline-offset: .18em; }
.product-details { border-top: 1px solid var(--line); font-size: .92rem; }
.product-details summary { cursor: pointer; padding: .85rem 0; }
.product-details div { padding-bottom: .9rem; color: var(--muted); }
.product-details p + p { margin-top: .55rem; }
.related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Transaction and legal pages */
.info-page, .commerce-page { padding-bottom: clamp(52px, 8vw, 120px); }
.info-page .page-head h1 { font-size: clamp(2.4rem, 5.6vw, 5.2rem); }
.info-lead { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.info-body { max-width: 870px; }
.info-body section { margin-bottom: 2rem; }
.info-body h2 { font-size: clamp(1.6rem, 3.8vw, 2.6rem); margin: 1.2rem 0 .75rem; }
.info-body p + p { margin-top: .6rem; }
.info-body a { text-decoration: underline; text-underline-offset: .18em; }
.info-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: clamp(.5rem, 2vw, 1.5rem); margin: 1.25rem auto; }
.info-gallery img { aspect-ratio: 3 / 4; object-fit: cover; }
.info-table-wrap { overflow-x: auto; }
.commerce-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.detail-grid > *, .checkout-layout > *, .commerce-grid > *, .cart-row > *, .filter-bar > * { min-width: 0; }
.commerce-panel { border: 1px solid var(--line); padding: clamp(14px, 3vw, 28px); background: var(--surface); }
.cart-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 96px auto; gap: .4rem 1rem; align-items: center; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.cart-row-photo { grid-row: span 2; }
.cart-row-photo img { width: 76px; aspect-ratio: 3 / 4; object-fit: cover; background: var(--tint); }
.cart-row-title { overflow-wrap: anywhere; display: grid; gap: .1rem; }
.cart-row-title a { font-weight: 550; }
.cart-row-title a:hover { color: var(--wine); }
.cart-row .field { grid-column: 3; grid-row: 1 / span 2; font-size: .78rem; }
.cart-row-total { overflow-wrap: anywhere; grid-column: 2; font-size: .92rem; }
.cart-row > .button { grid-column: 4; grid-row: 1 / span 2; min-height: 44px; padding: .55rem .85rem; }
.cart-total { margin-block: 1.1rem; font-size: 1.05rem; font-weight: 600; }
.commerce-page .fieldset { border: 1px solid var(--line); padding: 1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; min-width: 0; }
.commerce-page .fieldset legend { padding-inline: .3rem; }
.commerce-page h2 { font-size: clamp(1.4rem, 3vw, 2.3rem); margin-bottom: .65rem; }
.commerce-page .button { justify-self: start; }
.commerce-panel > p + .button { margin-top: 1rem; }
.commerce-grid > a { justify-self: start; text-decoration: underline; text-underline-offset: .2em; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(16px, 4vw, 55px); align-items: start; margin-top: 1rem; }
.checkout-summary { overflow-wrap: anywhere; padding: clamp(14px, 3vw, 28px); border: 1px solid var(--line); background: var(--paper); }
.checkout-summary ul { list-style: none; padding: 0; margin: 0; }
.checkout-summary li { display: grid; gap: .2rem; border-bottom: 1px solid var(--line); padding-block: .7rem; font-size: .88rem; }
.checkout-total { font-weight: 650; margin-top: 1rem; }
[data-orders-root] { display: grid; gap: 1rem; max-width: 940px; }
.demo-order { padding-block: 1rem; }
.demo-order summary { cursor: pointer; padding-block: .4rem; }
.demo-order summary strong { overflow-wrap: anywhere; }
.order-status { display: inline-block; margin-left: .75rem; color: var(--wine); font-size: .78rem; }
.demo-order > p, .demo-order > .button { margin-top: .65rem; }
.demo-order-items { padding-left: 1.25rem; }
[data-checkout-root] .commerce-panel > .button { margin: 1rem 1rem .25rem 0; }
.commerce-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; padding-top: var(--page-top); color: var(--muted); }
.commerce-nav a { padding: .42rem .65rem; border: 1px solid transparent; font-size: .84rem; }
.commerce-nav [aria-current] { border-color: var(--line); color: var(--ink); background: var(--surface); }
.commerce-nav a:hover { color: var(--wine); }
.transaction-page .page-head { padding-top: clamp(20px, 3vw, 44px); }
.page-order .page-head { padding-top: var(--page-top); }
.commerce-checkout .page-head, .commerce-cart .page-head { text-align: center; }
.commerce-page .page-head h1 { font-size: clamp(2.1rem, 5vw, 4.5rem); }
.orders-toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; }
.orders-toolbar > p { color: var(--muted); }
.empty-orders > .button { margin-top: 1rem; }
.pickup-map { width: 100%; min-width: 0; height: clamp(260px, 52svh, 380px); margin-block: 1rem; }
/* Map tiles keep their intrinsic dimensions; storefront image sizing must not stretch them. */
.pickup-map img { width: auto; max-width: none; }

/* Byte-pinned legal documents */
:is(.info-offer, .info-privacy) .page-head h1 { font-size: clamp(2.4rem, 5.6vw, 5.2rem); max-width: 15ch; overflow-wrap: break-word; }
:is(.info-offer, .info-privacy) .info-lead { font-size: .94rem; }
:is(.info-offer, .info-privacy) .info-body { max-width: 76ch; font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
:is(.info-offer, .info-privacy) .info-section { margin: 0; padding-bottom: clamp(20px, 4vw, 36px); }
:is(.info-offer, .info-privacy) .info-section + .info-section { border-top: 1px solid var(--line); padding-top: clamp(20px, 4vw, 36px); }
:is(.info-offer, .info-privacy) .info-section h2 { margin: 0 0 .85rem; font-size: clamp(1.48rem, 2.6vw, 2.65rem); line-height: 1.12; }
:is(.info-offer, .info-privacy) .info-section ul { padding-left: 1.25rem; }
.legal-layout { display: grid; grid-template-columns: minmax(190px, 255px) minmax(0, 1fr); gap: clamp(26px, 6vw, 90px); align-items: start; border-top: 1px solid var(--line); padding-top: clamp(20px, 4vw, 44px); }
.legal-contents { background: var(--tint); padding: 1rem 1.2rem; }
.legal-contents .eyebrow { color: var(--wine); margin-bottom: .9rem; }
.legal-contents ul { list-style: none; margin: 0; padding: 0; }
.legal-contents a { display: block; padding-block: .45rem; font-size: .87rem; line-height: 1.4; }
.legal-contents a:hover { color: var(--wine); text-decoration: underline; text-underline-offset: .2em; }
@media (min-width: 801px) and (min-height: 690px) {
  .legal-contents { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100svh - var(--header-h) - 40px); overflow-y: auto; }
}
@media (min-width: 1081px) and (min-height: 760px) {
  .detail-content { position: sticky; top: calc(var(--header-h) + 22px); }
}

/* Below this width the two nav groups no longer fit around the seal. */
@media (max-width: 1080px) {
  :root { --header-h: 62px; --seal-w: 78px; --seal-top: 5px; --tab-w: 114px; --tab-h: 112px; --tab-r: 44px; --seal-compact-w: 44px; }
  .header-inner { grid-template-columns: auto minmax(0, 1fr); }
  .menu-toggle { display: grid; margin-left: -10px; }
  .header-actions { justify-self: end; margin-right: -8px; }
  .site-nav { position: absolute; z-index: 3; inset: 100% 0 auto; display: none; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1.25rem; max-height: calc(100svh - var(--header-h)); overflow-y: auto; box-shadow: 0 18px 24px rgb(33 24 22 / .1); }
  .menu-toggle[aria-expanded="true"] ~ .site-nav { display: grid; }
  .site-nav a, .site-nav a:nth-child(3) { margin-left: 0; padding-block: 1rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; white-space: normal; }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { display: none; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-top { padding-top: var(--page-top); padding-bottom: 1.1rem; }
}
@media (max-width: 800px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-contents ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .8rem; }
}
@media (max-width: 800px) {
  .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  .checkout-summary { grid-row: 1; }
}
@media (max-width: 760px) {
  .detail-grid { grid-template-columns: 1fr; gap: 1rem; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid .product-card:nth-child(odd):last-child { display: none; }
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { grid-row: 1; }
}
@media (max-width: 640px) {
  .product-grid, .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-nav { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-bottom: .4rem; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
  .category-nav::-webkit-scrollbar { display: none; }
  .filter-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .search-field { grid-column: 1 / -1; }
  .catalog-count { grid-column: 1 / -1; padding-inline: 0; }
  .category-nav a, .commerce-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .commerce-page .button { width: 100%; justify-content: center; }
  .commerce-page .fieldset { padding: .8rem; }
  .commerce-page .fieldset .fieldset { padding: .65rem; }
  .commerce-page .fieldset > label:has(input[type="checkbox"]) { min-height: 44px; padding-block: .5rem; }
  .footer-grid nav a { min-height: 44px; display: flex; align-items: center; }
  .footer-base { flex-direction: column; gap: .5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .footer-grid > div { grid-column: 1 / -1; }
  .cart-row { grid-template-columns: 64px minmax(0, 1fr) 84px; }
  .cart-row-photo img { width: 64px; }
  .cart-row-photo { grid-row: span 3; }
  .cart-row > .button { grid-column: 2 / -1; grid-row: auto; justify-self: start; }
  .cart-row .field { grid-row: 1 / span 2; }
}
@media (max-width: 420px) {
  .cart-row { grid-template-columns: 64px minmax(0, 1fr); gap: .6rem .8rem; }
  .cart-row-photo { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
  .cart-row-title { grid-column: 2; }
  .cart-row .field { grid-column: 2; grid-row: auto; max-width: 100px; }
  .cart-row > .button { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  .product-photo:hover img:first-child { transform: none; }
}

/* ===== Фирменный стиль CHERTÓVSKİ (брендбук): шрифт STIX Two Text, цвета, логотип =====
   Блок в конце site.css, чтобы попал и на страницы с неизменяемой разметкой (offer, privacy). */
@font-face { font-family: "STIX Two Text"; src: url("fonts/stix-two-text-regular.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "STIX Two Text"; src: url("fonts/stix-two-text-italic.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
:root {
  --serif: "STIX Two Text", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --wine: #6B0909;
  --wine-deep: #4f0606;
  --navy: #1A273D;
  --beige: #E6D7C4;
  --paper: #F6F0E8;
  --tint: #ECE1D3;
  --line: #DCCDBB;
  /* шапка без свисающего медальона */
  --tab-h: var(--header-h);
  --seal-overhang: 0px;
  --page-top: 28px;
}
.site-header { background: rgb(246 240 232 / .94); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-nav a { font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.header-logo, .site-header.is-compact .header-logo, .site-header.is-menu-open .header-logo {
  top: 0; width: clamp(150px, 17vw, 230px); height: var(--header-h); background: transparent; border: 0; border-radius: 0; }
.header-logo::before, .site-header.is-compact .header-logo::before, .site-header.is-menu-open .header-logo::before {
  top: 50%; left: 50%; width: 100%; aspect-ratio: 375 / 63; transform: translate(-50%, -50%);
  -webkit-mask: url("brand/wordmark-wine.svg") center / contain no-repeat; mask: url("brand/wordmark-wine.svg") center / contain no-repeat; }
.footer-logo { width: 150px; aspect-ratio: 375 / 288; }
.footer-logo::before { aspect-ratio: 375 / 288; -webkit-mask: url("brand/logo-wine.svg") center / contain no-repeat; mask: url("brand/logo-wine.svg") center / contain no-repeat; }
.site-footer { background: var(--beige); }
@media (max-width: 1080px) { .header-logo, .site-header.is-compact .header-logo, .site-header.is-menu-open .header-logo { width: clamp(140px, 40vw, 190px); } }
h1, h2, .product-title, .hx-tag { font-family: var(--serif); }
/* Leave separate hit areas for menu, search and cart on narrow phones. */
@media (max-width: 480px) {
  .header-logo, .site-header.is-compact .header-logo, .site-header.is-menu-open .header-logo {
    left: calc(50% - 20px); width: clamp(120px, 36vw, 172px);
  }
}
