/* Sugar & Glass — storefront styles */
:root {
  --paper: #FBF5F0;
  --cream: #F3E8E0;
  --ink: #3A2A35;
  --mauve: #7D6873;
  --gold: #9C7A3C;
  --gold-soft: #D8BF8E;
  --line: rgba(58, 42, 53, .14);
  --rose: #F4C8D9;
  --lilac: #DCCFF5;
  --sky: #C8E6F3;
  --mint: #D6F0E3;
  --sheen: linear-gradient(125deg, var(--rose), var(--lilac) 35%, var(--sky) 65%, var(--mint) 85%, var(--rose));
  --display: 'Fraunces', Georgia, serif;
  --ui: 'Figtree', system-ui, sans-serif;
  --arch: 999px 999px 14px 14px;
  --wrap: min(1180px, 100% - 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
main { flex: 1; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: var(--wrap); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; font-variation-settings: 'SOFT' 100, 'WONK' 0; line-height: 1.08; margin: 0; letter-spacing: -.01em; }

/* ---------- Announcement + header ---------- */
.announce {
  background: var(--ink);
  color: #F6EAF0;
  text-align: center;
  font-size: .85rem;
  padding: .5rem 1rem;
}
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span {
  font-family: var(--display);
  font-variation-settings: 'SOFT' 100;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: .01em;
}
.nav { display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; color: var(--mauve); font-weight: 500; padding: .25rem 0; border-bottom: 1.5px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-color: var(--gold-soft); }
.bag-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem .95rem; cursor: pointer; font-weight: 600;
}
.bag-btn:hover { border-color: var(--gold-soft); }
.bag-btn svg { width: 18px; height: 18px; }
.bag-count {
  min-width: 1.35rem; height: 1.35rem; border-radius: 999px;
  background: var(--sheen); font-size: .78rem; display: grid; place-items: center; padding: 0 .3rem;
}
@media (max-width: 720px) {
  .nav { display: none; }
  .brand span { font-size: 1.2rem; }
  .site-header .wrap { height: 62px; }
}

/* ---------- Arched glass frame (signature) ---------- */
.arch {
  position: relative;
  border-radius: var(--arch);
  overflow: hidden;
  background: var(--cream);
  isolation: isolate;
}
.arch::after { /* thin iridescent rim */
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: var(--sheen);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero-kicker { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 1.15rem; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); font-weight: 400; max-width: 12ch; }
.hero p.lede { font-size: 1.12rem; color: var(--mauve); max-width: 46ch; margin: 1.5rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-window { position: relative; aspect-ratio: 4 / 5; max-width: 440px; width: 100%; justify-self: center; }
.hero-window .arch { position: absolute; inset: 0; }
.hero-window .arch img { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-window .arch img.on { opacity: 1; }
.hero-mark {
  position: absolute; top: -34px; left: 50%; translate: -50% 0;
  width: 92px; z-index: 3; filter: drop-shadow(0 8px 16px rgba(157, 120, 170, .35));
}
.hero-caption {
  position: absolute; z-index: 3; left: 50%; bottom: 1rem; translate: -50% 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-radius: 999px; padding: .4rem 1rem; font-size: .88rem; white-space: nowrap;
  text-decoration: none;
}
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-window { max-width: 270px; order: -1; margin-top: 1.75rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; padding: .85rem 1.5rem; font-weight: 600; text-decoration: none;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: #523d4b; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--cream); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-head a { color: var(--mauve); font-weight: 500; }
.section + .section { border-top: 1px solid var(--line); }

/* Collections shelf */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2rem 1.5rem; }
.jar { text-decoration: none; display: block; }
.jar .arch { aspect-ratio: 3 / 4; }
.jar .arch img { transition: transform .6s ease; }
.jar:hover .arch img { transform: scale(1.04); }
.jar h3 { font-size: 1.45rem; margin-top: 1rem; }
.jar p { margin: .3rem 0 0; color: var(--mauve); font-size: .95rem; }
.jar .count { color: var(--gold); font-size: .88rem; margin-top: .4rem; display: block; }
.jar.soon .arch { display: grid; place-items: center; background: var(--sheen); }
.jar.soon .arch img { width: 46%; height: auto; object-fit: contain; opacity: .9; }
.category-label { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 1.25rem; margin: 2.5rem 0 1rem; }
.category-label:first-child { margin-top: 0; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2.25rem 1.5rem; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 1.75rem .9rem; } }
.card { position: relative; }
.card > a { text-decoration: none; display: block; }
.card .arch { aspect-ratio: 4 / 5; }
.card h3 { font-family: var(--ui); font-weight: 600; font-size: 1rem; line-height: 1.35; margin-top: .85rem; letter-spacing: 0; }
.card .price { color: var(--mauve); margin-top: .15rem; }
.card.sold .arch img { filter: grayscale(.65) opacity(.7); }
.tag {
  position: absolute; z-index: 3; left: 50%; bottom: .75rem; translate: -50% 0;
  background: var(--paper); border-radius: 999px; padding: .25rem .8rem; font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.tag.hold { background: var(--lilac); }
.quick-add {
  margin-top: .6rem; width: 100%;
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: .5rem; font-weight: 600; font-size: .9rem; cursor: pointer;
}
.quick-add:hover { border-color: var(--gold-soft); background: color-mix(in srgb, var(--cream) 60%, transparent); }
.quick-add.in { background: var(--sheen); border-color: transparent; }

/* ---------- Collection page ---------- */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.crumb { color: var(--mauve); text-decoration: none; font-size: .92rem; }
.crumb:hover { color: var(--ink); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 400; margin-top: .75rem; }
.page-head p { color: var(--mauve); font-size: 1.08rem; max-width: 52ch; margin: .75rem 0 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0 2rem; color: var(--mauve); font-size: .95rem; border-top: 1px solid var(--line); margin-top: 1.75rem; }
.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; }
.switch input { accent-color: var(--gold); width: 1.05rem; height: 1.05rem; }

/* ---------- Piece page ---------- */
.piece { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; align-items: start; }
.gallery .arch { aspect-ratio: 4 / 5; }
.thumbs { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
.thumbs button { width: 68px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--cream); }
.thumbs button[aria-current="true"] { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.piece-info { position: sticky; top: 100px; }
.piece-info h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 400; margin-top: .75rem; }
.piece-info .price { font-size: 1.4rem; margin: 1rem 0 1.25rem; }
.details { white-space: pre-line; color: var(--mauve); margin: 0 0 1.75rem; max-width: 48ch; }
.assure { list-style: none; padding: 1.25rem 0 0; margin: 1.75rem 0 0; border-top: 1px solid var(--line); color: var(--mauve); font-size: .95rem; display: grid; gap: .5rem; }
.assure li::before { content: '✦'; color: var(--gold-soft); margin-right: .6rem; }
@media (max-width: 820px) { .piece { grid-template-columns: 1fr; } .piece-info { position: static; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.about img { width: 100%; max-width: 220px; }
.about h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 1rem; }
.about p { color: var(--mauve); max-width: 60ch; font-family: var(--display); font-size: 1.15rem; line-height: 1.75; font-variation-settings: 'SOFT' 50; }
@media (max-width: 640px) { .about { grid-template-columns: 1fr; } .about img { max-width: 120px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; margin-top: 2rem; color: var(--mauve); font-size: .92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.site-footer img { width: 220px; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- Bag drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(58, 42, 53, .35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer {
  position: fixed; z-index: 41; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), visibility 0s .3s;
}
body.bag-open .scrim { opacity: 1; pointer-events: auto; }
body.bag-open .drawer { transform: none; visibility: visible; transition-delay: 0s; box-shadow: -20px 0 60px rgba(58, 42, 53, .15); }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 1.6rem; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: .4rem; border-radius: 999px; line-height: 0; }
.icon-btn:hover { background: var(--cream); }
.drawer .items { flex: 1; overflow-y: auto; padding: .5rem 1.5rem; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 80px; object-fit: cover; border-radius: 999px 999px 8px 8px; }
.line a { text-decoration: none; font-weight: 600; line-height: 1.3; display: block; }
.line .muted { color: var(--mauve); font-size: .9rem; }
.line .remove { background: none; border: 0; color: var(--mauve); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: 0; margin-top: .25rem; }
.line.gone { opacity: .55; }
.drawer footer { padding: 1.25rem 1.5rem 1.5rem; border-top: 1px solid var(--line); }
.subtotal { display: flex; justify-content: space-between; font-weight: 600; font-size: 1.1rem; }
.drawer .note { color: var(--mauve); font-size: .88rem; margin: .35rem 0 1rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--mauve); }
.empty img { width: 70px; margin: 0 auto 1rem; opacity: .85; }
.alert { background: #FBE7EC; border-radius: 10px; padding: .75rem 1rem; font-size: .9rem; margin: 1rem 0 0; }

/* Toast */
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: 1.5rem; translate: -50% 1rem; opacity: 0;
  background: var(--ink); color: var(--paper); padding: .75rem 1.25rem; border-radius: 999px; font-size: .92rem;
  transition: opacity .2s, translate .2s; pointer-events: none;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* Skeletons */
.skel { background: linear-gradient(90deg, var(--cream), #f8efe9, var(--cream)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Simple centered pages */
.center-page { text-align: center; padding: clamp(3rem, 10vw, 7rem) 0; }
.center-page img { width: 110px; margin: 0 auto 1.5rem; }
.center-page h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 400; }
.center-page p { color: var(--mauve); max-width: 46ch; margin: 1rem auto 2rem; font-size: 1.08rem; }

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