@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,400..800,50..100&family=DM+Sans:opsz,wght@9..40,400..700&family=Bricolage+Grotesque:opsz,wght@12..96,800&family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Caveat+Brush&display=swap');

:root {
  --paper: #fbf4f1;
  --paper-2: #f6e2e4;
  --ink: #1f1b2e;
  --ink-2: #4b4560;
  --muted: #847d92;
  --line: #ecd5d6;
  --teal: #1f8a8a;
  --violet: #6b4fd8;
  --amber: #e0a43a;
  --rose: #d96a7f;
  --pour: linear-gradient(125deg, var(--teal) 0%, var(--violet) 48%, var(--rose) 78%, var(--amber) 100%);
  --danger: #b4323f;
  --heart: #d42a3f;
  --blush: #fbe1e5;
  --ok: #2c7a4b;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --text-hero: clamp(2.6rem, 1.4rem + 5vw, 5.4rem);
  --radius-drop: 42% 58% 55% 45% / 48% 42% 58% 52%;
  --shadow-1: 0 1px 2px rgb(31 27 46 / 0.06), 0 8px 24px -12px rgb(31 27 46 / 0.25);
  --shadow-2: 0 2px 4px rgb(31 27 46 / 0.08), 0 24px 48px -20px rgb(31 27 46 / 0.4);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { 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(--font-body);
  background-image: radial-gradient(rgb(31 27 46 / 0.035) 1px, transparent 1px);
  background-size: 4px 4px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

/* Header */
.announce { background: var(--heart); color: var(--paper); text-align: center; font-size: 0.85rem; padding: 0.5rem 1rem; letter-spacing: 0.02em; }
.announce:empty { display: none; }
.site-head { position: sticky; top: 0; z-index: 20; background: rgb(251 244 241 / 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; text-decoration: none; letter-spacing: -0.01em; font-variation-settings: 'SOFT' 100; display: flex; align-items: center; gap: 0.55rem; }
.brand-drop { width: 1.35rem; height: 1.35rem; background: var(--pour); border-radius: var(--radius-drop); box-shadow: inset -3px -4px 6px rgb(0 0 0 / 0.18), inset 3px 3px 5px rgb(255 255 255 / 0.4); }
.cart-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; text-decoration: none; font-weight: 600; transition: background 0.2s, color 0.2s; }
.cart-btn:hover { background: var(--ink); color: var(--paper); }
.cart-count { min-width: 1.4rem; height: 1.4rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 0.78rem; display: grid; place-items: center; padding-inline: 0.3rem; }
.cart-btn:hover .cart-count { background: var(--paper); color: var(--ink); }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: end; }
.hero h1 { font-family: var(--font-display); font-size: var(--text-hero); line-height: 0.95; margin: 0; letter-spacing: -0.035em; font-weight: 650; font-variation-settings: 'SOFT' 100, 'opsz' 144; }
.hero h1 em { font-style: italic; background: var(--pour); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.08em; }
.hero p { color: var(--ink-2); font-size: 1.1rem; max-width: 34ch; margin: 0; }
.hero-blob { justify-self: end; width: min(280px, 60vw); aspect-ratio: 1; background: var(--pour); border-radius: var(--radius-drop); box-shadow: inset -18px -24px 40px rgb(0 0 0 / 0.22), inset 14px 16px 30px rgb(255 255 255 / 0.35), var(--shadow-2); animation: wobble 14s ease-in-out infinite alternate; }
@keyframes wobble { to { border-radius: 55% 45% 42% 58% / 52% 58% 42% 48%; transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .hero-blob { animation: none; } }

/* Filters */
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1.75rem; }
.chip { border: 1.5px solid var(--line); background: var(--paper); padding: 0.4rem 0.95rem; border-radius: 999px; cursor: pointer; font-size: 0.92rem; transition: border-color 0.2s, background 0.2s; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 2.25rem 1.5rem; padding-bottom: 4rem; }
.card { text-decoration: none; display: flex; flex-direction: column; gap: 0.75rem; }
.card.featured { grid-column: span 2; }
@media (max-width: 640px) { .card.featured { grid-column: span 1; } }
.card-img { position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow-1); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.card.featured .card-img { aspect-ratio: 16 / 10; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.card:hover .card-img { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card:hover img { transform: scale(1.04); }
.card-img .placeholder { position: absolute; inset: 18%; background: var(--pour); border-radius: var(--radius-drop); opacity: 0.55; }
.tag { position: absolute; top: 0.8rem; left: 0.8rem; background: rgb(245 240 232 / 0.92); padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.tag.sold { background: var(--ink); color: var(--paper); }
.card-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding-inline: 0.2rem; }
.card-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 550; line-height: 1.25; }
.price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.9rem 1.6rem; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font-weight: 650; cursor: pointer; text-decoration: none; transition: transform 0.15s, box-shadow 0.25s, background-position 0.6s; font-size: 1rem; }
.btn:hover { box-shadow: var(--shadow-2); }
.btn:active { transform: scale(0.97); }
.btn.pour { background: var(--pour); background-size: 180% 100%; }
.btn.pour:hover { background-position: 100% 0; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }

label.field { display: grid; gap: 0.3rem; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; padding: 0.75rem 0.9rem; border-radius: 12px; border: 1.5px solid var(--line); background: #fffdf9; font-weight: 400; color: var(--ink); font-size: 1rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgb(107 79 216 / 0.15); }
.row { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.error { color: var(--danger); font-weight: 600; }
.notice { background: var(--paper-2); border-radius: 14px; padding: 1rem 1.2rem; color: var(--ink-2); }

/* Product page */
.product { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); padding: 2.5rem 0 5rem; }
@media (max-width: 820px) { .product { grid-template-columns: 1fr; } }
.gallery-main { border-radius: 26px; overflow: hidden; background: var(--paper-2); aspect-ratio: 1; box-shadow: var(--shadow-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 0.6rem; margin-top: 0.9rem; overflow-x: auto; padding-bottom: 0.3rem; }
.thumbs button { flex: 0 0 72px; height: 72px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--paper-2); }
.thumbs button[aria-current='true'] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info { position: sticky; top: 6rem; align-self: start; display: grid; gap: 1.1rem; }
.product-info h1 { font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); line-height: 1.02; margin: 0; letter-spacing: -0.025em; font-weight: 650; }
.product-info .price { font-size: 1.5rem; }
.desc { white-space: pre-line; color: var(--ink-2); }
.stock { font-size: 0.9rem; color: var(--muted); }
.stock.low { color: var(--rose); font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 2.6rem; height: 2.6rem; border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; }
.qty span { min-width: 2rem; text-align: center; font-weight: 700; }
.fine { font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }
.back { display: inline-block; margin-top: 1.5rem; color: var(--ink-2); text-decoration: none; font-weight: 600; }

/* Cart */
.cart-page { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; padding: 2.5rem 0 5rem; }
@media (max-width: 820px) { .cart-page { grid-template-columns: 1fr; } }
.page-title { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 3rem); letter-spacing: -0.025em; margin: 0 0 1.25rem; font-weight: 650; }
.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.line img, .line .ph { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; background: var(--paper-2); }
.line-title { font-family: var(--font-display); font-weight: 550; text-decoration: none; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 0.88rem; text-decoration: underline; }
.summary { background: #fffdf9; border: 1px solid var(--line); border-radius: 24px; padding: 1.6rem; display: grid; gap: 1rem; align-self: start; box-shadow: var(--shadow-1); }
.sum-row { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.sum-row.total { font-weight: 800; font-size: 1.2rem; border-top: 1px solid var(--line); padding-top: 0.8rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--ink-2); font-size: 0.92rem; }
.site-foot .wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .site-foot .wrap, .hero { grid-template-columns: 1fr; } .hero-blob { display: none; } }
.site-foot h2 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 0.5rem; color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); background: var(--ink); color: var(--paper); padding: 0.8rem 1.3rem; border-radius: 999px; box-shadow: var(--shadow-2); transition: transform 0.4s var(--ease); z-index: 50; font-weight: 600; }
.toast.show { transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero-side { display: grid; gap: 1.5rem; justify-items: end; }
@media (max-width: 700px) { .hero-side { justify-items: start; } }
.thanks { padding: 3rem 0 5rem; max-width: 560px; display: grid; gap: 1rem; }
.grid > .empty { grid-column: 1 / -1; }
.site-foot .wrap:empty { display: none; }

/* Rhynova brand layer: logo, blush, glitter */
.brand-logo { width: 52px; height: 52px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-1); object-fit: contain; }
.brand span[data-shop-name] { font-size: 1.3rem; }
@media (max-width: 420px) { .brand span[data-shop-name] { display: none; } }
.hero { position: relative; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0 -50vw; z-index: -1; background: linear-gradient(180deg, var(--blush), transparent 85%); }
body { overflow-x: hidden; }
.hero h1 em { background: linear-gradient(100deg, var(--heart), var(--violet) 55%, var(--teal)); -webkit-background-clip: text; background-clip: text; }
.hero-blob { position: relative; overflow: hidden; }
.glitter { position: absolute; inset: 0; border-radius: inherit; mix-blend-mode: screen; opacity: 0.9;
  background:
    radial-gradient(circle at 20% 30%, #fff8 0 1.5px, transparent 2px) 0 0 / 23px 19px,
    radial-gradient(circle at 60% 70%, #ffd76ecc 0 1.5px, transparent 2.2px) 0 0 / 31px 27px,
    radial-gradient(circle at 40% 50%, #ffffffaa 0 1px, transparent 1.6px) 0 0 / 13px 17px; }
.price.sale { color: #2e7d4f; }
.price s { color: var(--muted); font-weight: 500; margin-left: 0.25rem; }
.price small { color: var(--muted); font-weight: 500; }
.price-lg .price { font-size: 1.5rem; }
.tag.sale { background: var(--heart); color: #fff; }
.cart-count { background: var(--heart); }
.admin-head .brand-logo { width: 40px; height: 40px; }

/* Wordmark logo (header) and full glitter-spill logo (hero, Glitter Pop only) */
.brand-wordmark { height: 52px; width: auto; display: block; }
@media (max-width: 420px) { .brand-wordmark { height: 40px; } }
.hero-logo { display: none; }
.pop-only { display: none; }
/* Product badges (Glitter Pop dresses these up in theme-pop.css) */
.flag { position: absolute; top: 0.8rem; right: 0.8rem; background: rgb(255 255 255 / 0.92); color: var(--ink); padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.product-info .flag { position: static; justify-self: start; }
html, body { overflow-x: clip; }
.product-info .qty { justify-self: start; }
.gallery-main { position: relative; }
.product > *, .cart-page > * { min-width: 0; } /* long thumb rows must scroll, not widen the page */
/* Product video */
.gallery-main video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.watch-btn { position: absolute; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem 0.6rem 0.8rem; border: 0; border-radius: 999px; background: rgb(23 23 23 / 0.82); color: #fff; font-weight: 700; cursor: pointer; backdrop-filter: blur(4px); }
.watch-btn::before, .thumb-video::after, .has-video::before { content: ''; width: 0; height: 0; border-style: solid; border-width: 0.4em 0 0.4em 0.68em; border-color: transparent transparent transparent currentColor; }
.watch-btn:hover { background: rgb(23 23 23 / 0.95); }
.thumb-video { position: relative; }
.thumb-video::after { position: absolute; inset: 0; margin: auto; color: #fff; font-size: 1.4rem; filter: drop-shadow(0 1px 3px rgb(0 0 0 / 0.6)); }
.has-video { position: absolute; right: 0.8rem; bottom: 0.8rem; width: 2.1rem; height: 2.1rem; border-radius: 999px; display: grid; place-items: center; background: rgb(23 23 23 / 0.75); color: #fff; font-size: 0.95rem; padding-left: 0.15em; }
