@font-face{font-family:Manrope;src:url('assets/manrope-latin.woff2') format('woff2');font-weight:400 800;font-display:swap}
@font-face{font-family:Manrope;src:url('assets/manrope-cyr.woff2') format('woff2');font-weight:400 800;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Prata;src:url('assets/prata-latin.woff2') format('woff2');font-display:swap}
@font-face{font-family:Prata;src:url('assets/prata-cyr.woff2') format('woff2');font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

:root {
  color-scheme: light;
  --paper: #f9f8f6;
  --ink: #26211f;
  --wine: #54242d;
  --wine-dark: #3b1820;
  --muted: #675a55;
  --line: #d9d0cb;
  --blush: #eee3df;
  --serif: Prata, Georgia, serif;
  --sans: Manrope, Arial, sans-serif;
  --gutter: clamp(1.1rem, 5vw, 5.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.6; }
body:has(dialog[open]) { overflow: hidden; }
html { scroll-behavior: smooth; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
.wrap { width: min(100% - 2 * var(--gutter), 90rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; background: var(--paper); padding: .65rem; z-index: 5; }

.header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.65rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; }
.wordmark { justify-self: start; text-decoration: none; font-family: var(--serif); font-size: 2.2rem; letter-spacing: -.085em; line-height: 1; color: var(--wine); white-space: nowrap; }
.wordmark span { color: #a65861; margin-left: .05em; }
.main-nav { display: flex; gap: clamp(1rem, 3vw, 2.65rem); align-items: center; }
.main-nav a { text-decoration: none; font-size: .9rem; font-weight: 650; white-space: nowrap; }
.main-nav a:hover { color: var(--wine); text-decoration: underline; text-underline-offset: .32em; }
.header-actions { display: flex; justify-self: end; gap: .35rem; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: .28rem; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .45rem; border: 0; background: transparent; }
.icon-button:hover { background: var(--blush); }
.icon-button svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bag-button span { min-width: 1ch; color: var(--wine); font-weight: 750; font-size: .875rem; }

.hero { min-height: clamp(25rem, 41vw, 40rem); display: grid; background: #342620; color: #fffaf5; }
.hero-copy { grid-area: 1 / 1; z-index: 1; align-self: center; padding: 3rem max(var(--gutter), calc(50vw - 45rem)); pointer-events: none; }
.hero h1, .catalog h2, .shop-details h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.047em; }
.hero h1 { font-size: clamp(3.4rem, 6.6vw, 7rem); line-height: 1.04; margin-bottom: 1.1rem; }
.hero-link { display: inline-block; width: fit-content; padding-block: .6rem; font-weight: 700; text-decoration: underline; text-underline-offset: .45em; pointer-events: auto; }
.hero-link:hover { text-decoration-thickness: 2px; }
.hero-link:focus-visible { outline-color: currentColor; }
.hero-media { grid-area: 1 / 1; position: relative; }
.hero-media img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 2%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(29 19 16 / .88), rgb(29 19 16 / .62) 33%, transparent 70%); }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .85rem 1.32rem; min-height: 3.15rem; border: 1px solid var(--wine); text-align: center; text-decoration: none; font-weight: 750; font-size: .9rem; transition: background-color .18s, color .18s; }
.solid { color: white; background: var(--wine); }
.solid:hover { background: var(--wine-dark); }

.catalog { padding-block: clamp(2.5rem, 5vw, 5rem) clamp(3rem, 6vw, 6.5rem); }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .85rem; }
.catalog h2 { font-size: clamp(2.1rem, 3.65vw, 3.65rem); line-height: 1.13; }
#catalog-count { font-size: .875rem; white-space: nowrap; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0 clamp(1rem, 2.8vw, 2.4rem); border-block: 1px solid var(--line); margin-bottom: clamp(1rem, 2vw, 1.55rem); }
.filters button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: .45rem 0; min-height: 2.75rem; color: var(--muted); font-size: .875rem; font-weight: 650; }
.filters button:hover { color: var(--wine); }
.filters button[aria-pressed="true"] { border-color: var(--wine); color: var(--wine); font-weight: 800; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.75rem, 3.5vw, 3rem) clamp(.75rem, 1.55vw, 1.5rem); }
.product-trigger { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 0; }
.product-media { aspect-ratio: 4 / 5; overflow: hidden; display: block; background: #e4dcd6; margin-bottom: .65rem; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-trigger:hover img { transform: scale(1.035); }
.product-trigger:hover .product-name { text-decoration: underline; text-underline-offset: .2em; }
.product-name { display: block; font-weight: 750; line-height: 1.4; text-wrap: pretty; }
.product-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 0 .6rem; flex-wrap: wrap; margin-top: .18rem; font-size: .875rem; }
.product-price { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.product-color, .muted { color: var(--muted); }

.shop-details { background: #f0eae6; border-block: 1px solid var(--line); }
.shop-details-inner { padding-block: clamp(2rem, 4vw, 3.5rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 5vw, 5rem); }
.shop-details h2 { font-size: clamp(1.5rem, 2.55vw, 2.25rem); line-height: 1.2; margin-bottom: .55rem; }
.shop-details p { max-width: 34rem; }
.shop-details .text-link { display: inline-block; margin-top: .4rem; }
.text-link { text-underline-offset: .28em; text-decoration-thickness: 1px; font-weight: 700; }
.text-link:hover { text-decoration-thickness: 2px; }
.footer { padding-block: clamp(2.2rem, 4vw, 3.8rem); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.35rem, 5vw, 5rem); }
.footer-brand { display: inline-block; margin-bottom: .55rem; }
.footer h2 { font-size: .9rem; font-weight: 750; margin-bottom: .35rem; }
.footer p { margin: .2rem 0; color: var(--muted); font-size: .875rem; }

dialog { color: var(--ink); background: var(--paper); border: 0; padding: 0; }
dialog::backdrop { background: rgb(37 24 27 / .55); }
.panel { position: fixed; inset: 0 0 0 auto; margin: 0; max-height: 100%; max-width: 100%; height: 100%; width: 29rem; padding: clamp(1rem, 4vw, 2rem); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.panel-head h2, .product-dialog h2 { font: 400 clamp(1.65rem, 3.5vw, 2.4rem)/1.24 var(--serif); letter-spacing: -.042em; text-wrap: pretty; }
.close-button { background: transparent; border: 1px solid var(--line); width: 2.75rem; height: 2.75rem; font-size: 1rem; }
.close-button:hover { background: var(--blush); }
.search-input { width: 100%; border: 1px solid #a99a92; background: white; padding: .7rem .8rem; margin-bottom: .6rem; color: var(--ink); border-radius: 0; }
.result-list { display: grid; gap: .7rem; margin-block: .9rem; }
.result { display: grid; grid-template-columns: 4rem minmax(0, 1fr); text-align: left; align-items: center; padding: .6rem 0; gap: .75rem; border: 0; border-top: 1px solid var(--line); background: transparent; }
button.result:hover { color: var(--wine); }
.result img { display: block; width: 4rem; height: 5rem; object-fit: cover; background: var(--blush); }
.result-details { min-width: 0; }
.result-details strong, .result-details span { display: block; }
.result-details .muted { font-size: .875rem; }
.bag-summary, #bag-empty { margin-block: 1.25rem; }
.bag-total { display: flex; justify-content: space-between; font-weight: 800; padding-block: .75rem; border-top: 1px solid var(--line); }
.bag-summary .button { width: 100%; }
.bag-note { margin-top: .6rem; font-size: .875rem; }
.order-intro { margin-bottom: 1rem; }
.order-label { display: block; font-size: .875rem; font-weight: 750; margin-bottom: .35rem; }
.order-text { width: 100%; min-height: 10rem; resize: vertical; border: 1px solid #a99a92; background: white; color: var(--ink); font: inherit; padding: .65rem .75rem; border-radius: 0; }
.order-actions { display: flex; align-items: baseline; flex-wrap: wrap; gap: .55rem 1rem; margin-top: .65rem; }
#order-long, #order-status { margin-top: .65rem; font-size: .875rem; }
.quantity { display: flex; align-items: center; gap: .55rem; margin-top: .45rem; font-size: .9rem; }
.quantity button { min-width: 2rem; min-height: 2rem; padding: 0 .3rem; border: 1px solid var(--line); background: transparent; }
.quantity button:hover { background: var(--blush); }
.quantity .remove { margin-left: auto; border: 0; text-decoration: underline; text-underline-offset: .25em; }

.product-dialog { width: min(50rem, calc(100% - 2rem)); max-width: 100%; max-height: calc(100% - 2rem); }
.product-dialog-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.product-dialog-layout > img { width: 100%; height: 100%; object-fit: cover; background: var(--blush); }
.product-dialog-copy { position: relative; padding: 3.75rem 1.75rem 1.25rem; }
.detail-close { position: absolute; right: .75rem; top: .75rem; }
.detail-price { font-size: 1.1rem; font-weight: 750; margin: .65rem 0 1rem; font-variant-numeric: tabular-nums; }
.detail-specs { display: grid; gap: .15rem; margin: .85rem 0 1.05rem; font-size: .9rem; }
.detail-specs div { display: grid; grid-template-columns: 4.1rem 1fr; gap: .55rem; }
.detail-specs dt { color: var(--muted); }
.detail-specs dd { margin: 0; }
.size-picker { padding: 0; border: 0; margin: .85rem 0 1.15rem; }
.size-picker legend { font-size: .875rem; font-weight: 750; padding: 0 0 .45rem; }
#detail-sizes { display: flex; flex-wrap: wrap; gap: .4rem; }
.size-option { display: grid; position: relative; }
.size-option span { display: grid; place-items: center; padding: .35rem .65rem; min-height: 2.45rem; border: 1px solid var(--line); font-size: .875rem; font-weight: 750; cursor: pointer; }
.size-option input:checked + span { border-color: var(--wine); background: var(--blush); color: var(--wine); }
.size-option input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }
.detail-status { font-size: .875rem; }
.detail-status:empty { margin: 0; }
.detail-status:not(:empty) { margin-top: .55rem; }
.text-button { display: block; min-height: 2.75rem; padding: .5rem 0; border: 0; background: none; text-decoration: underline; text-underline-offset: .24em; font-size: .875rem; font-weight: 700; color: var(--wine); }
.text-button:hover { text-decoration-thickness: 2px; }
.quantity button[aria-disabled="true"] { opacity: .55; cursor: default; }

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

@media (max-width: 760px) {
  .header-inner { grid-template-columns: 1fr 1fr; gap: 0; }
  .wordmark { font-size: 1.85rem; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; gap: clamp(.8rem, 5vw, 1.65rem); padding: .2rem 0 .65rem; }
  .header-actions, .header-inner > .wordmark { margin-top: .4rem; }
  .hero { min-height: 0; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
  .hero-media { aspect-ratio: 5 / 3; }
  .hero-media img { object-position: 65% top; }
  .hero-media::after { display: none; }
  .hero-copy { grid-area: 2 / 1; padding: 1.35rem var(--gutter) 1.15rem; }
  .hero h1 { font-size: clamp(2.35rem, 9vw, 4rem); margin-bottom: .15rem; }
  .hero-link { font-size: .9rem; }
  .filters { gap: 0 1rem; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-name { font-size: .9375rem; }
  .shop-details-inner, .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 525px) {
  .product-dialog-layout { display: block; }
  .product-dialog-layout > img { object-position: center 43%; max-height: 40svh; min-height: 0; }
  .product-dialog-copy { padding: 1.4rem 1.15rem .8rem; }
  .detail-close { position: fixed; top: 1.6rem; right: 1.65rem; }
  .detail-close button { background: var(--paper); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
