:root {
  color-scheme: light;
  --paper: #fbf7f0;
  --ink: #261c1b;
  --muted: #645651;
  --wine: #572835;
  --deep: #401924;
  --line: #d9cbc0;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 2px solid #94652a; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; }
em { font-weight: inherit; }
section, main { scroll-margin-top: 5.5rem; }
.shell { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: .8rem; left: .8rem; z-index: 5; transform: translateY(-200%); padding: .5rem 1rem; background: white; }
.skip-link:focus { transform: none; }
.header { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { min-height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.wordmark { display: inline-flex; flex-direction: column; align-items: center; width: fit-content; color: var(--deep); text-decoration: none; font: clamp(1.25rem, 2.6vw, 2rem)/.95 var(--serif); letter-spacing: -.045em; white-space: nowrap; }
.wordmark span { font: 700 .58rem/1 var(--sans); letter-spacing: .37em; padding-left: .37em; margin-top: .4rem; }
.header nav { display: flex; justify-content: center; gap: clamp(1rem, 3.1vw, 3.25rem); }
.header nav a { text-decoration: none; font-size: .92rem; white-space: nowrap; }
.header nav a:hover, .text-link:hover { color: #9a4254; }
.quote-button { justify-self: end; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 43px; border: 1px solid var(--line); padding: 0 .8rem; background: transparent; font-size: .88rem; font-weight: 650; white-space: nowrap; }
.quote-button:hover { border-color: var(--wine); }
.quote-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.quote-count { display: grid; place-items: center; min-width: 1.45rem; height: 1.45rem; padding-inline: .23rem; border-radius: 100px; background: var(--wine); color: #fff8ed; font-size: .75rem; }

.hero { background: #f0e4d9; border-bottom: 1px solid var(--line); }
.hero-inner { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem 2rem; padding-block: clamp(2.2rem, 5vw, 4.5rem); }
.hero h1 { font-size: clamp(2.65rem, 6vw, 5.3rem); line-height: 1; letter-spacing: -.062em; }
.hero h1 em { color: var(--wine); }
.hero p { max-width: 50ch; color: var(--muted); margin-top: .9rem; }
.button { min-height: 47px; display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1.15rem; border: 1px solid transparent; font-size: .92rem; font-weight: 650; line-height: 1.25; text-align: center; text-decoration: none; }
.primary { color: #fff9f2; background: var(--wine); }
.primary:hover { background: var(--deep); }
.outline { background: transparent; border-color: var(--line); }
.outline:hover { border-color: var(--wine); }
.text-link { width: fit-content; margin: 0; padding: .18rem 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; font-size: .92rem; font-weight: 650; text-decoration: none; line-height: 1.35; }

.collection { padding-block: clamp(2rem, 4vw, 3.6rem); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .35rem 1.25rem; margin-bottom: .85rem; }
.section-heading h2, .wholesale h2 { font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.05em; }
.pricing-note { color: var(--muted); font-size: .9rem; }
.catalog-controls { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1rem; padding-block: .6rem; margin-bottom: 1rem; border-block: 1px solid var(--line); }
.filters { display: flex; gap: .45rem; flex-wrap: wrap; }
.filters button { background: transparent; border: 1px solid transparent; padding: .44rem .72rem; font-size: .9rem; }
.filters button:hover { border-color: var(--line); }
.filters button[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff8ed; }
#result-count { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.product-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: #fffaf3; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem 1rem; background: var(--card-tint); color: #332624; font-size: .82rem; font-weight: 650; }
.card-copy { display: flex; flex: 1; flex-direction: column; gap: 1rem; padding: 1.05rem 1rem; }
.card-copy h3 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); letter-spacing: -.035em; margin-bottom: .25rem; }
.card-price { font-size: .91rem; color: var(--muted); }
.card-footer { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-top: auto; }
.swatches { list-style: none; display: flex; flex-wrap: wrap; gap: .38rem; padding: 0; margin: 0; }
.swatches li { width: 15px; height: 15px; border-radius: 50%; border: 1px solid #261c1b3d; background: var(--swatch); }
.wholesale { border-top: 1px solid var(--line); background: #f0e4d9; }
.wholesale-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding-block: clamp(1.6rem, 4vw, 3rem); }
.wholesale p { color: var(--muted); max-width: 55ch; margin-top: .45rem; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

dialog { padding: 0; color: var(--ink); border: 1px solid var(--line); background: var(--paper); box-shadow: 0 16px 74px #26131937; max-height: calc(100dvh - 2rem); }
dialog::backdrop { background: #27182088; }
.product-dialog { width: min(500px, calc(100% - 2rem)); }
.product-dialog > .close-button { position: absolute; top: .7rem; right: .7rem; z-index: 1; }
.close-button { border: 1px solid var(--line); width: 2.6rem; height: 2.6rem; background: var(--paper); font-size: 1.55rem; line-height: 1; }
.close-button:hover { border-color: var(--wine); }
.detail-body { padding: 2rem; }
.detail-reference { color: var(--wine); font-size: .82rem; font-weight: 650; padding-right: 2.6rem; }
.detail-body h2 { font-size: 2.3rem; margin: .3rem 2.3rem .65rem 0; letter-spacing: -.035em; }
.detail-body .product-description { color: var(--muted); margin-top: .7rem; }
.specs { margin: .8rem 0 1.1rem; padding: .55rem 0; border-block: 1px solid var(--line); font-size: .91rem; }
.specs div { display: flex; gap: .7rem; justify-content: space-between; padding-block: .15rem; }
.specs dd { margin: 0; text-align: right; color: var(--muted); }
.product-form { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: .75rem; }
.product-form label { display: grid; gap: .25rem; font-weight: 650; font-size: .89rem; }
.product-form .button { grid-column: 1 / -1; }
#product-error { grid-column: 1 / -1; }
.product-form select, input, textarea { min-width: 0; width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: #fffaf4; font-weight: 400; font-size: 1rem; }
.product-form select { appearance: none; padding-right: 1.7rem; }
.select-label { position: relative; }
.select-label::after { content: ''; width: .45rem; height: .45rem; position: absolute; right: .75rem; bottom: 1.15rem; border: solid var(--wine); border-width: 0 1px 1px 0; transform: rotate(45deg); pointer-events: none; }

.quote-dialog { width: min(490px, 100%); height: 100dvh; max-height: 100dvh; max-width: 100%; margin: 0 0 0 auto; padding: 1.25rem; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.drawer-header h2 { font-size: 2.45rem; letter-spacing: -.045em; }
.quote-empty { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.quote-empty p { margin-bottom: .9rem; color: var(--muted); }
.quote-line { padding-block: .85rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
.quote-line h3 { font-size: 1.35rem; }
.quote-line p { color: var(--muted); font-size: .87rem; }
.line-actions { display: grid; grid-template-columns: 2.1rem minmax(1.65rem, auto) 2.1rem; align-items: center; text-align: center; font-variant-numeric: tabular-nums; }
.line-actions button { border: 1px solid var(--line); min-height: 2.1rem; background: transparent; }
.line-actions button[data-remove] { border: 0; grid-column: 1 / -1; text-decoration: underline; text-underline-offset: 3px; font-size: .8rem; padding: .1rem 0; }
.estimate { display: flex; align-items: center; justify-content: space-between; padding-top: .75rem; border-top: 1px solid var(--line); }
.fine-print { color: var(--muted); font-size: .86rem; }
#quote-fields > label { display: block; font-weight: 650; margin-block: 1rem .2rem; font-size: .91rem; }
#quote-fields > label span { font-weight: 400; }
.drawer-actions { display: flex; gap: .55rem; margin-block: 1rem .6rem; }
.drawer-actions > * { flex: 1; }
#quote-preview { margin-top: .5rem; }
.toast { position: fixed; bottom: 1rem; right: 1rem; z-index: 5; max-width: calc(100% - 2rem); padding: .75rem 1rem; background: var(--deep); color: #fff8ed; opacity: 0; transform: translateY(.5rem); transition: .2s; pointer-events: none; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 56px); }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; grid-template-columns: 1fr auto; gap: .6rem; }
  .header nav { display: none; }
  .hero h1 { font-size: clamp(2.6rem, 8vw, 4.5rem); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
}
@media (max-width: 450px) {
  .catalog-controls { flex-direction: column; align-items: start; gap: .3rem; }
  .filters { gap: .2rem; }
  .filters button { padding-inline: .55rem; }
  .product-grid { grid-template-columns: 1fr; }
  .detail-body { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
