:root {
  --plum: #4d152d;
  --purple: #6e2a5a;
  --mauve: #8f5a7f;
  --off-white: #e8e1e6;
  --gold: #d4af7c;
  --paper: #faf6f6;
  --ink: #38212e;
  --muted: #6c5362;
  --line: #e6d9e1;
  --serif: "Bodoni Moda", Georgia, serif;
  --sans: "Montserrat", system-ui, sans-serif;
  --description-font: "Lato", var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6.25rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; width: 100%; height: auto; }
svg { width: 1.25rem; height: 1.25rem; flex: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.12; }
h2 { font-family: var(--serif); font-size: clamp(2.45rem, 4vw, 3.6rem); color: var(--plum); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #9a6432; outline-offset: 4px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 10; inset: .5rem auto auto .5rem; padding: .75rem 1rem; background: white; }
.section-shell { width: min(100% - 6rem, 76rem); margin-inline: auto; }

.announcement {
  min-height: 2.2rem; display: flex; align-items: center; justify-content: center; gap: .7rem;
  background: var(--plum); color: #fcf1ef; font-size: .75rem; letter-spacing: .1em;
}
.announcement svg { width: .58rem; height: .58rem; color: var(--gold); }
.site-header { position: sticky; top: 0; z-index: 3; background: var(--paper); }
.header-inner {
  width: min(100% - 6rem, 83rem); min-height: 5.25rem; margin: auto; display: grid;
  grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
.site-header nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.4rem); font-size: .875rem; }
.site-header nav a:hover, .footer nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
.brand { display: inline-flex; width: max-content; flex-direction: column; align-items: center; color: var(--plum); font: 500 2.65rem/.84 var(--serif); letter-spacing: .16em; padding-left: .16em; }
.brand span { margin-top: .45rem; font: 600 .62rem/1 var(--sans); letter-spacing: .29em; }
.header-actions { display: flex; justify-content: end; align-items: center; gap: .8rem; }
.icon-button { min-width: 2.75rem; min-height: 2.75rem; display: inline-flex; justify-content: center; align-items: center; border: 0; background: transparent; color: inherit; padding: .5rem; }
.icon-button:hover { color: var(--purple); }
.icon-button svg { width: 1.4rem; height: 1.4rem; }
.bag-button { gap: .45rem; padding-right: 0; }
#cart-count { display: grid; place-items: center; min-width: 1.24rem; height: 1.24rem; padding: 0 .2rem; background: var(--plum); color: white; border-radius: 2rem; font-size: .7rem; }

.hero { --hero-h: clamp(30rem, 42vw, 41rem); position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; background: #2b1020; color: #fff7f5; }
.hero-media { grid-column: 2; grid-row: 1; position: relative; display: block; height: var(--hero-h); aspect-ratio: 3 / 4; }
.hero-media img { width: 100%; height: 100%; object-fit: contain; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #2b1020 0%, rgba(43,16,32,.6) 8%, transparent 22%); pointer-events: none; }
.hero-inner { grid-column: 1; grid-row: 1; width: auto; min-height: var(--hero-h); margin: 0 2rem 0 max(3rem, (100vw - 76rem) / 2); display: flex; align-items: center; }
.hero-copy { max-width: 42rem; padding: 3rem 0 3.4rem; }
.eyebrow { color: var(--purple); font-size: .75rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.hero-label { color: var(--gold); margin-bottom: 1.5rem; }
.hero h1 { max-width: 10.7em; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(3.5rem, 5.7vw, 6.3rem); line-height: .94; letter-spacing: -.035em; }
.hero h1 em { color: #e2bf90; font-weight: 500; }
.hero-caption { position: absolute; right: 1rem; bottom: .85rem; color: #fff7f5; background: #2b1020d9; padding: .2rem .45rem; font-size: .75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 3.05rem; padding: .65rem 1.35rem; border: 1px solid transparent; font-size: .9rem; font-weight: 700; }
.button-hero { margin-top: 2rem; background: var(--gold); color: #311a27; }
.button-hero:hover { background: #e4c597; }
.button-primary { background: var(--plum); color: #fff9f8; }
.button-primary:hover:not(:disabled) { background: var(--purple); }
.button-primary:disabled { background: var(--line); color: var(--muted); }

.categories { padding-block: clamp(3rem, 5vw, 5rem) clamp(3.5rem, 6vw, 5.8rem); }
.section-intro { text-align: center; margin-bottom: 2rem; }
.section-ornament { display: flex; justify-content: center; align-items: center; gap: .65rem; margin-bottom: .85rem; color: #956334; }
.section-ornament::before, .section-ornament::after { content: ""; width: 1.5rem; height: 1px; background: var(--gold); }
.section-ornament svg { width: .8rem; height: .8rem; }
.category-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.65rem, 2vw, 1.65rem); }
.category-tile { display: grid; justify-items: center; align-content: start; gap: .65rem; padding: 0; border: 0; background: transparent; color: var(--plum); text-align: center; font: 600 clamp(1rem, 1.55vw, 1.35rem)/1.2 var(--sans); overflow-wrap: anywhere; }
.category-tile .photo { width: 100%; max-width: 13rem; aspect-ratio: 1.22; border-radius: 50% 50% .15rem .15rem / 60% 60% .15rem .15rem; }
.category-tile:hover .photo { box-shadow: 0 0 0 2px var(--mauve); }
.category-message { color: var(--muted); text-align: center; }
.photo { position: relative; display: grid; place-items: center; overflow: hidden; background: #eee2e8; color: var(--muted); }
.photo img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.photo svg { color: var(--mauve); width: 1.7rem; height: 1.7rem; }
.photo .photo-fallback { display: grid; place-items: center; gap: .25rem; font: .75rem/1.2 var(--sans); text-align: center; }

.collection { background: #f0e8ed; padding-block: clamp(3rem, 5vw, 5.5rem); }
.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.65rem; }
.collection-heading .eyebrow { margin-bottom: .65rem; }
.text-button { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: 0; background: none; border: 0; color: var(--plum); font-size: .875rem; font-weight: 700; white-space: nowrap; }
.text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: .2em; }
.text-button:disabled { opacity: .65; }
.text-button svg { width: 1rem; height: 1rem; }
.catalog-tools { display: flex; align-items: start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #d9c6d2; padding-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter { min-height: 2.75rem; padding: .35rem .9rem; border: 1px solid #d5c0ce; background: transparent; color: var(--plum); font-size: .875rem; border-radius: 2rem; }
.filter[aria-pressed="true"], .filter:hover { background: var(--plum); color: #fff9f8; border-color: var(--plum); }
.search-box { flex: 0 1 16rem; position: relative; }
.search-box svg { position: absolute; pointer-events: none; left: .75rem; top: .7rem; color: var(--purple); }
.search-box input { width: 100%; min-height: 2.75rem; padding: .45rem .75rem .45rem 2.4rem; border: 1px solid #d5c0ce; border-radius: 2rem; background: var(--paper); color: var(--ink); }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.demo-notice, .catalog-status { margin-top: 1.1rem; color: var(--muted); font-size: .875rem; }
.demo-notice { border-left: 2px solid var(--mauve); padding-left: .7rem; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; margin-top: 1.1rem; }
.product-card { display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 1px solid var(--line); }
.product-cover { position: relative; width: 100%; display: block; padding: 0; border: 0; background: transparent; text-align: left; }
.product-cover .photo { aspect-ratio: 1.09; }
.product-cover:focus-visible { outline-offset: -3px; z-index: 1; }
.photo img { transition: transform .25s ease; }
.product-cover:hover img, .category-tile:hover img { transform: scale(1.035); }
.product-badge { position: absolute; inset: .65rem auto auto .65rem; max-width: calc(100% - 1.3rem); background: var(--paper); color: var(--plum); font-size: .75rem; font-weight: 700; padding: .24rem .55rem; }
.product-body { display: flex; flex: 1; flex-direction: column; gap: .5rem; padding: 1rem; overflow-wrap: anywhere; }
.product-meta { color: var(--purple); font-size: .75rem; font-weight: 700; }
.product-body h3 { font-size: clamp(1.05rem, 1.55vw, 1.35rem); font-weight: 600; color: var(--plum); }
.product-name { padding: 0; text-align: left; border: 0; background: none; color: inherit; font: inherit; }
.product-name:hover { text-decoration: underline; text-underline-offset: .13em; }
.product-description { font-family: var(--description-font); }
.product-body .product-description { color: var(--muted); font-size: .875rem; }
.product-price { color: var(--plum); font-weight: 700; margin-top: auto; padding-top: .2rem; }
.product-add { min-height: 2.75rem; margin-top: .25rem; padding-inline: .4rem; border-color: var(--plum); background: transparent; color: var(--plum); }
.product-add:hover:not(:disabled) { background: var(--plum); color: white; }
.product-add:disabled { color: var(--muted); border-color: var(--line); }

.about { padding-block: clamp(3.75rem, 8vw, 7rem); background: var(--off-white); }
.about-inner { max-width: 41rem; text-align: center; }
.about-inner svg { color: #906135; margin-bottom: .65rem; }
.about-inner p { margin-top: 1.1rem; color: var(--muted); }
.footer { background: var(--plum); color: #fff3f1; padding-block: 2.8rem; }
.footer-inner { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.footer .brand { color: #fff3f1; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.footer-note, #store-info { font-size: .875rem; white-space: pre-line; }

dialog { color: var(--ink); background: var(--paper); border: 0; padding: 0; }
dialog::backdrop { background: #29101cc0; }
.product-dialog { width: min(52rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); }
.dialog-close { position: absolute; top: .4rem; right: .4rem; z-index: 1; border-radius: 50%; background: var(--paper); }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; }
.product-detail .photo { min-height: 24rem; }
.detail-gallery { min-width: 0; align-self: center; }
.detail-gallery .photo img { object-fit: contain; }
.gallery-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .5rem; padding: .25rem .65rem; }
.gallery-controls .text-button { min-width: 2.75rem; padding-inline: .3rem; }
.gallery-count { color: var(--muted); font-size: .875rem; }
.detail-copy { display: grid; align-content: center; gap: .8rem; padding: 2.65rem 1.65rem 1.75rem; overflow-wrap: anywhere; }
.detail-copy h2 { font-family: var(--sans); font-size: clamp(1.65rem, 3vw, 2.45rem); font-weight: 600; }
.detail-copy label { display: grid; justify-items: start; gap: .3rem; }
.detail-copy input { min-height: 2.75rem; width: 6rem; padding: .25rem .55rem; color: var(--plum); border: 1px solid var(--mauve); background: white; }
.detail-stock { color: var(--muted); font-size: .875rem; }
.cart-dialog[open] { width: min(100%, 29rem); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; display: flex; flex-direction: column; }
.cart-header, .cart-footer { flex: none; padding: 1rem 1.3rem; }
.cart-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.cart-header h2 { font-size: 2.45rem; }
.cart-content { overflow: auto; flex: 1; padding: 1.1rem 1.3rem; overscroll-behavior: contain; }
.cart-empty { color: var(--muted); text-align: center; padding-top: 1.5rem; }
.cart-line { display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: start; gap: .7rem; border-bottom: 1px solid var(--line); padding: .75rem 0; }
.cart-line .photo { aspect-ratio: 1; }
.cart-line h3 { color: var(--plum); font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.cart-line p { font-size: .875rem; }
.line-controls { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); }
.stepper button { width: 2.75rem; height: 2.75rem; background: none; border: 0; color: var(--plum); }
.stepper button:disabled { color: #8c7984; }
.stepper span { min-width: 1.35rem; text-align: center; }
.cart-footer { display: grid; gap: .7rem; border-top: 1px solid var(--line); max-height: 56%; overflow: auto; }
.cart-footer > p { color: var(--muted); font-size: .875rem; }
.cart-total { display: flex; gap: .65rem; justify-content: space-between; color: var(--plum); }
.cart-feedback { background: #efe3ea; padding: .6rem .7rem; overflow-wrap: anywhere; }
.toast { visibility: hidden; position: fixed; z-index: 5; right: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); background: var(--plum); color: white; padding: .7rem 1rem; box-shadow: 0 2px 15px #28101c40; }
.toast.visible { visibility: visible; }

@media (max-width: 63rem) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-copy { max-width: 33rem; }
}
@media (max-width: 46rem) {
  html { scroll-padding-top: 7.8rem; }
  .section-shell, .header-inner, .hero-inner { width: calc(100% - 2rem); }
  .header-inner { min-height: auto; grid-template-columns: 1fr auto 1fr; gap: .25rem; padding-top: .55rem; }
  .header-inner .brand { grid-row: 1; grid-column: 2; font-size: 2.1rem; padding-block: .4rem; }
  .header-actions { grid-row: 1; grid-column: 3; gap: .1rem; }
  .site-header nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; gap: 1.55rem; }
  .site-header nav a { padding-block: .7rem; line-height: 1.25; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { grid-column: 1; grid-row: 1; width: 100%; height: auto; }
  .hero-media::after { background: linear-gradient(0deg, #2b1020 0%, transparent 10%); }
  .hero-inner { grid-column: 1; grid-row: 2; min-height: 0; margin: 0 auto; width: calc(100% - 2rem); }
  .hero-copy { padding: 1.25rem 0 2.25rem; }
  .hero-caption { top: .75rem; bottom: auto; }
  .hero h1 { font-size: clamp(2.9rem, 8.4vw, 4.5rem); }
  .hero-label { margin-bottom: .75rem; }
  .button-hero { margin-top: 1.25rem; }
  .category-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.25rem; }
  .collection-heading { align-items: start; flex-direction: column; gap: .35rem; margin-bottom: .65rem; }
  .catalog-tools { flex-direction: column-reverse; }
  .search-box { flex: auto; width: min(100%, 24rem); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .product-body { padding: .65rem; }
}
@media (max-width: 33rem) {
  .product-detail { grid-template-columns: 1fr; }
  .product-detail .photo { min-height: 0; aspect-ratio: 1.55; }
  .detail-copy { padding: 1rem; }
}
@media (max-width: 22rem) {
  .header-actions .search-link { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .hero-break { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.cart-feedback { white-space: pre-line; }
