@font-face { font-family: Editorial; src: url('assets/fonts/editorial.woff') format('woff'); font-display: swap; }
@font-face { font-family: Catalog Sans; src: url('assets/fonts/body.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: Catalog Sans; src: url('assets/fonts/body-bold.woff') format('woff'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: Manrope; src: url('assets/fonts/manrope-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #41101b;
  --deep: #350a15;
  --paper: #f1e3d5;
  --light-paper: #fff3e2;
  --muted: #6b4845;
  --line: #ad8a7b;
  --serif: Editorial, Georgia, serif;
  --sans: 'Catalog Sans', Arial, sans-serif;
  --gutter: clamp(1.15rem, 4.15vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.45 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: .97; letter-spacing: -.058em; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.storefront {
  --ink: #4d0f36;
  --paper: #eee6f5;
  --light-paper: #fcf7ff;
  --muted: #714565;
  --line: #aa89ac;
  --cta: #55143e;
  --cta-hover: #712455;
  --accent-light: #f0e2f5;
  --sans: Manrope, 'Catalog Sans', Arial, sans-serif;
}
.storefront h1, .storefront h2 { font-family: var(--sans); font-weight: 400; letter-spacing: -.058em; }
.site-header { min-height: clamp(3.75rem, min(6.5vw, 10svh), 6.25rem); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; padding: .35rem var(--gutter); }
.wordmark { width: max-content; font-family: var(--serif); font-size: clamp(1.28rem, 2.65vw, 2.3rem); line-height: 1; letter-spacing: .105em; white-space: nowrap; }
.site-header .wordmark { font-family: var(--sans); font-size: clamp(1.13rem, 2.5vw, 2.4rem); font-weight: 500; letter-spacing: .19em; }
.site-header-actions { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.75rem); }
.catalog-admin { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); font-size: clamp(.88rem, 1.28vw, 1.12rem); white-space: nowrap; text-decoration: underline; text-underline-offset: .25em; }
.catalog-admin:hover { color: var(--ink); }
.vanity-toggle { display: flex; align-items: center; min-height: 2.75rem; gap: .5rem; border: 0; padding: 0; background: none; white-space: nowrap; font-size: clamp(.94rem, 1.8vw, 1.7rem); }
.vanity-toggle:hover { text-decoration: underline; text-underline-offset: .3rem; }
.vanity-count { display: grid; place-items: center; height: 1.35rem; min-width: 1.35rem; border-radius: 50%; padding-inline: .2rem; color: var(--light-paper); background: var(--cta); font-size: .75rem; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .53rem 1.23rem; border: 1px solid transparent; border-radius: .65rem; line-height: 1.3; text-align: center; font-weight: 600; }
.button-primary { color: var(--light-paper); background: var(--cta, var(--ink)); }
.button-primary:hover { background: var(--cta-hover, #661225); }
.button-outline { border-color: var(--line); background: #fff8f06b; }
.button-outline:hover { background: var(--accent-light, #f6e0d7); }
.text-link { border: 0; background: none; padding: .35rem 0; text-decoration: underline; text-underline-offset: .34rem; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }
.product-art { display: block; width: 100%; height: 100%; }
.scene-cutout { object-fit: contain; object-position: center bottom; }
.no-photo { display: grid; place-items: center; min-width: 0; min-height: 2.5rem; color: inherit; font-size: .875rem; }

.tone-rose { background: radial-gradient(ellipse at 45% 33%, #fff2fa, #e4c7de); }
.tone-lilac { background: radial-gradient(ellipse at 45% 33%, #f9f3ff, #d5c8ec); }
.tone-cream { background: radial-gradient(ellipse at 45% 33%, #fff6ed, #e8d5e8); }
.product-brand { font-weight: 700; }
.product-price { font-size: 1.06rem; font-weight: 700; }
.product-note, .vanity-note { color: var(--muted); font-size: .85rem; }

dialog { border: 0; padding: 0; color: var(--ink); background: transparent; max-height: calc(100dvh - 2rem); overscroll-behavior: contain; }
dialog::backdrop { background: #3c174161; backdrop-filter: blur(4px); }
.dialog-panel { position: relative; border: 1px solid #fffaff; background: var(--light-paper); border-radius: 1.15rem; overflow: hidden; }
.product-dialog { width: min(54rem, calc(100% - 2rem)); border-radius: 1.15rem; box-shadow: 0 18px 55px #541e6942; }
.close-button { position: absolute; z-index: 2; top: .75rem; right: .75rem; width: 2.65rem; height: 2.65rem; border-radius: 50%; border: 1px solid #d9bfdd; background: var(--light-paper); }
.close-button::before, .close-button::after { content: ''; position: absolute; top: calc(50% - .5px); left: 26%; width: 48%; height: 1px; background: currentColor; transform: rotate(45deg); }
.close-button::after { transform: rotate(-45deg); }
.close-button:hover { background: var(--accent-light); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 58%); }
.detail-media { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.detail-image { min-width: 0; min-height: 23rem; display: grid; place-items: center; position: relative; padding: 2rem 1.8rem 4rem; overflow: hidden; }
.detail-photo-view { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; min-width: 0; }
.detail-image .product-art { max-height: 23rem; filter: drop-shadow(7px 10px 9px #5b356c4c); transition: transform .23s; }
.detail-image.is-zoomed .product-art { transform: scale(1.23); }
.detail-image button { position: absolute; bottom: .9rem; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--light-paper); }
.detail-thumbnails { display: flex; justify-content: safe center; gap: .4rem; padding: .65rem; overflow: auto; }
.detail-thumbnails button { flex: 0 0 clamp(2.65rem, 5vw, 3.65rem); height: 3.25rem; padding: .2rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--light-paper); }
.detail-thumbnails button[aria-pressed='true'] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--accent-light); }
.detail-thumbnails button:focus-visible { outline-offset: 1px; }
.detail-thumbnails .scene-cutout { object-position: center; }
.detail-copy { display: grid; justify-items: start; gap: .72rem; padding: 2.25rem 2rem 1.7rem; }
.detail-copy h2 { font-size: clamp(2rem, 4vw, 3.35rem); max-width: calc(100% - 1rem); }
.detail-description { color: var(--muted); }
.detail-price { font-size: 1.5rem; font-weight: 700; }
.detail-sizes, .detail-variants { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; border: 0; }
.detail-sizes legend, .detail-variants legend { color: var(--muted); padding: 0; margin-bottom: .45rem; }
.detail-sizes button, .detail-variants button { min-height: 2.4rem; padding: .32rem .65rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--light-paper); }
.detail-sizes [aria-pressed='true'], .detail-variants [aria-pressed='true'] { border-color: var(--ink); background: var(--accent-light); font-weight: 700; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; margin-top: .4rem; }
.detail-feedback { min-height: 1.3em; color: var(--muted); font-size: .9rem; }

.vanity-dialog { position: fixed; inset: auto var(--gutter) 1rem auto; margin: 0; width: min(37rem, calc(100% - 2 * var(--gutter))); border-radius: 1.15rem; box-shadow: 0 10px 36px #541e6952; }
.vanity-panel { padding: 1.1rem 1.35rem 1.2rem; background: linear-gradient(150deg, var(--light-paper), #eadcf3); }
.vanity-head { min-height: 2.5rem; display: flex; align-items: center; }
.vanity-head h2 { font-size: 2.55rem; }
.vanity-item { display: grid; grid-template-columns: 3.9rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid #d9bfdc; }
.vanity-thumb { height: 4.45rem; padding: .32rem; border-radius: .4rem; }
.vanity-item h3 { font-size: 1rem; line-height: 1.2; }
.vanity-item p { font-size: .9rem; }
.vanity-item .text-link { min-height: 2.6rem; font-size: .85rem; }
.vanity-empty { padding: 1.1rem 0; color: var(--muted); }
.vanity-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: .85rem 0 .55rem; }
.vanity-feedback:not(:empty) { margin-top: .45rem; font-weight: 600; }
.copy-fallback { display: grid; gap: .35rem; margin: .75rem 0; }
.copy-fallback textarea { width: 100%; padding: .5rem; background: var(--light-paper); border: 1px solid var(--line); border-radius: .4rem; }

@media (max-width: 760px) {
  .detail-copy { padding: 2.75rem 1.15rem 1.2rem; }
  .detail-image { padding-inline: .75rem; }
}

@media (max-width: 660px) {
  .product-dialog { width: calc(100% - 1.25rem); max-height: calc(100dvh - 1.25rem); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-image { min-height: 0; height: 12.5rem; padding: .6rem 1rem 2.9rem; }
  .detail-image button { bottom: .45rem; min-height: 2.2rem; }
  .detail-copy { padding: 1rem 1.05rem 1.25rem; }
  .vanity-dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: 86dvh; border-radius: 1.15rem 1.15rem 0 0; }
  .vanity-panel { border-radius: inherit; padding-bottom: max(1.15rem, env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) {
  .site-header-actions { flex-direction: column; align-items: end; gap: 0; }
  .site-header-actions > * { min-height: 2.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
