/* Over The Rainbow — storefront styles
   Palette is sampled from the logo. Plum is the one dark: it sits behind the
   logo so the pink lettering reads clearly, and it is the heading/ink colour. */
@font-face { font-family: 'Bricolage Grotesque'; src: url('/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }

:root {
  --plum: #2e1437; --plum-soft: #452152; --ink: #2a2230; --muted: #675b6f;
  --paper: #fff; --blush: #fff5fa; --line: #eadfee;
  --pink: #ff89cd; --pink-hover: #ff6fc1; --pink-text: #b0206b;
  --peach: #ffc4a8; --yellow: #ffe88a; --mint: #a9f2bc; --lilac: #ddb8f8;
  --danger: #b3261e; --ok: #1d6b3a;
  --display: 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 12px; --r-md: 20px; --r-lg: 32px; --wrap: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; color: var(--ink); background: var(--paper); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); color: var(--plum); line-height: 1.1; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); } h2 { font-size: clamp(1.5rem, 4vw, 2.125rem); } h3 { font-size: 1.1875rem; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--pink-text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 6px; }
[tabindex='-1']:focus { outline: none; }
.on-plum :focus-visible, .site-header :focus-visible { outline-color: var(--yellow); }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--yellow); color: var(--plum); padding: .75rem 1rem; border-radius: var(--r-sm); z-index: 100; font-weight: 600; }
.skip:focus { top: 1rem; }
.muted { color: var(--muted); } .small { font-size: .9375rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .75rem 1.75rem; border-radius: 999px; border: 2px solid transparent; font: 600 1.0625rem/1.2 var(--body); cursor: pointer; text-decoration: none; transition: background-color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--pink); color: var(--plum); }
.btn-primary:hover { background: var(--pink-hover); }
.btn-dark { background: var(--plum); color: #fff; } .btn-dark:hover { background: var(--plum-soft); }
.btn-ghost { background: transparent; border-color: var(--plum); color: var(--plum); } .btn-ghost:hover { background: var(--blush); }
.btn-block { width: 100%; } .btn-sm { min-height: 44px; padding: .5rem 1.25rem; font-size: 1rem; }
.btn[disabled], .btn[aria-disabled='true'] { background: #ece6ef; color: #6d6473; cursor: not-allowed; border-color: transparent; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--plum); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-dark.is-loading::after { border-color: #fff; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: .5rem; font: inherit; color: var(--pink-text); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* Header */
.announce { background: var(--yellow); color: var(--plum); text-align: center; padding: .5rem 1rem; font-size: .9375rem; font-weight: 500; }
.site-header { background: var(--plum); color: #fff; position: sticky; top: 0; z-index: 40; }
.header-main { display: flex; align-items: center; gap: .5rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; margin-right: auto; padding: 4px 0; }
.brand img { height: 64px; width: auto; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: #fff; cursor: pointer; }
.icon-btn:hover { background: var(--plum-soft); }
.icon-btn svg { width: 26px; height: 26px; }
.basket-count { position: absolute; top: 2px; right: 0; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--pink); color: var(--plum); font: 700 .8125rem/22px var(--body); text-align: center; }
.basket-count[data-n='0'] { display: none; }
.header-search { display: none; }
.search-form { display: flex; background: #fff; border-radius: 999px; overflow: hidden; }
.search-form input { flex: 1; min-width: 0; border: 0; padding: 0 1.25rem; height: 48px; font: inherit; color: var(--ink); background: transparent; }
.search-form input:focus-visible { outline: none; }
.search-form:focus-within { outline: 3px solid var(--yellow); outline-offset: 2px; }
.search-form button { border: 0; background: var(--pink); color: var(--plum); padding: 0 1.25rem; font: 600 1rem var(--body); cursor: pointer; }
.menu-toggle svg { width: 28px; height: 28px; } .menu-icon { display: grid; place-items: center; }
.menu-toggle .when-open, .menu-toggle[aria-expanded='true'] .when-closed { display: none; } .menu-toggle[aria-expanded='true'] .when-open { display: grid; }
/* Phone and tablet: everything lives in the drop-down menu */
.site-menu { display: none; }
.site-menu.is-open { display: block; padding: .25rem 0 1rem; max-height: calc(100dvh - 84px); overflow-y: auto; animation: menu-in .16s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
.site-menu .header-search.mobile { display: block; padding-bottom: .5rem; }
.site-nav { display: flex; flex-direction: column; }
.site-nav a { color: #fff; text-decoration: none; padding: 0 .5rem; min-height: 54px; display: flex; align-items: center; justify-content: space-between; font-weight: 500; font-size: 1.125rem; border-top: 1px solid var(--plum-soft); border-radius: 0; }
.site-nav a::after { content: '›'; font-size: 1.5rem; color: var(--pink); line-height: 1; }
.site-nav a:hover, .site-nav a[aria-current='page'] { background: var(--plum-soft); }
.site-nav a.nav-extra { font-size: 1rem; color: #eadcf0; }
@media (min-width: 900px) { .header-main { min-height: 96px; } .brand img { height: 84px; } }
/* Wide screens: one header row — logo, menu, search, basket */
@media (min-width: 1100px) {
  .site-header .wrap { display: flex; align-items: center; gap: .75rem; min-height: 108px; }
  .header-main, .site-menu, .site-menu.is-open { display: contents; }
  .brand { order: 1; margin-right: 0; } .brand img { height: 96px; }
  .menu-toggle, .site-menu .header-search.mobile, .site-nav a.nav-extra { display: none; }
  .site-nav { order: 2; flex: 1; flex-direction: row; justify-content: center; }
  .site-nav a { padding: .5rem .75rem; min-height: 44px; font-size: 1rem; white-space: nowrap; border: 0; border-radius: 999px; }
  .site-nav a::after { content: none; }
  .header-search.desktop { display: block; order: 3; width: 268px; }
  .search-form input { padding-left: 1rem; } .search-form button { padding: 0 1rem; }
  .basket-btn { order: 4; }
  .two-col .summary-box, .product-media { top: 132px; }
}

/* Hero */
.hero { background: var(--plum); color: #fff; border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 1rem 0 2.5rem; }
.hero-grid { display: grid; gap: 1.5rem; align-items: center; text-align: center; justify-items: center; }
.hero-logo { width: min(64vw, 290px); height: auto; }
.hero h1 { color: #fff; margin-bottom: .4em; text-wrap: balance; }
.hero p { color: #eadcf0; font-size: 1.125rem; margin-inline: auto; max-width: 40ch; }
.hero .btn { margin-top: .5rem; min-height: 58px; font-size: 1.125rem; padding-inline: 2.25rem; }
.hero-note { font-size: .9375rem !important; color: #d6c3de !important; margin-top: 1rem; margin-bottom: 0; }
@media (min-width: 800px) {
  .hero { padding: 2rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 1fr minmax(280px, 400px); text-align: left; justify-items: start; gap: 3rem; }
  .hero p { margin-inline: 0; } .hero-logo { width: 100%; order: 2; justify-self: end; }
}

/* Category shortcuts — laid out like a wax snap bar: five joined segments */
.snapbar { display: grid; gap: 6px; padding: 8px; border-radius: 30px; background: var(--line); list-style: none; margin: 0; }
.snapbar a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 104px; padding: .5rem .75rem .5rem 1.125rem; border-radius: 22px; color: var(--plum); text-decoration: none; font: 700 1.125rem/1.15 var(--display); overflow: hidden; }
.snapbar a img { order: 2; flex: none; width: 124px; height: 88px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(46, 20, 55, .18)); transition: transform .2s ease; }
.snapbar a:hover img { transform: scale(1.05); }
.snapbar li:nth-child(1) a { background: var(--pink); } .snapbar li:nth-child(2) a { background: var(--peach); }
.snapbar li:nth-child(3) a { background: var(--yellow); } .snapbar li:nth-child(4) a { background: var(--mint); } .snapbar li:nth-child(5) a { background: var(--lilac); }
@media (min-width: 720px) { .snapbar { grid-template-columns: repeat(5, 1fr); } .snapbar a { flex-direction: column; justify-content: flex-end; align-items: stretch; min-height: 0; padding: 1rem .875rem 1rem; gap: .75rem; font-size: 1.0625rem; }
  .snapbar a img { order: 0; width: 100%; height: clamp(110px, 12vw, 160px); } .snapbar a span { text-align: center; } }

/* Product grid and cards */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem .875rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { display: flex; flex-direction: column; height: 100%; }
.card-media { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; background: var(--blush); aspect-ratio: 1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card.is-out .card-media img { opacity: .55; filter: grayscale(.4); }
.badge { position: absolute; top: .625rem; left: .625rem; background: var(--plum); color: #fff; font-size: .8125rem; font-weight: 600; padding: .25rem .625rem; border-radius: 999px; }
.card h3 { margin: .75rem 0 .25rem; font-size: 1.0625rem; }
.card h3 a { color: inherit; text-decoration: none; } .card h3 a:hover { text-decoration: underline; }
.card-desc { font-size: .9375rem; color: var(--muted); margin: 0 0 .5rem; }
.card-foot { margin-top: auto; }
.price { font-weight: 700; color: var(--plum); font-size: 1.0625rem; margin: 0 0 .625rem; }
.card .btn { width: 100%; min-height: 48px; padding-inline: .5rem; font-size: 1rem; }
.skeleton { border-radius: var(--r-md); background: linear-gradient(100deg, #f4edf7 40%, #fbf7fc 50%, #f4edf7 60%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; aspect-ratio: 3/4; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Intro band */
.intro { background: var(--blush); border-radius: var(--r-lg); padding: clamp(1.5rem, 5vw, 3rem); }
.intro p { font-size: 1.125rem; margin-bottom: 0; white-space: pre-line; }

/* Shop controls */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: 4px 1rem; margin-inline: -1rem; scrollbar-width: none; list-style: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; white-space: nowrap; min-height: 46px; padding: 0 1.125rem; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--plum); font: 500 1rem var(--body); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.chip:hover { border-color: var(--plum); }
.chip[aria-pressed='true'], .chip[aria-current='true'] { background: var(--plum); border-color: var(--plum); color: #fff; }
.chip.scent[aria-pressed='true'] { background: var(--pink); border-color: var(--pink); color: var(--plum); }
.shop-tools { display: grid; gap: .75rem; margin: 1rem 0 1.5rem; grid-template-columns: minmax(0, 1fr); }
.shop-tools > * { min-width: 0; }
@media (min-width: 720px) { .shop-tools { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.filter-label { font-weight: 600; color: var(--plum); font-size: .9375rem; margin: 0 0 .125rem; }
.field-inline { display: flex; gap: .625rem; align-items: center; }
.empty { text-align: center; padding: 3rem 1rem; background: var(--blush); border-radius: var(--r-lg); }
.empty p { margin-inline: auto; }

/* Forms */
label, legend { font-weight: 600; color: var(--plum); display: block; margin-bottom: .375rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .9375rem; display: block; }
input[type='text'], input[type='email'], input[type='tel'], input[type='search'], input[type='number'], select, textarea {
  width: 100%; min-height: 52px; padding: .75rem 1rem; font: inherit; color: var(--ink); background: #fff; border: 2px solid #cdbfd4; border-radius: var(--r-sm); }
textarea { min-height: 120px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--plum); outline-offset: 1px; border-color: var(--plum); }
.field { margin-bottom: 1.125rem; }
.field-error { color: var(--danger); font-weight: 500; font-size: .9375rem; margin: .375rem 0 0; }
[aria-invalid='true'] { border-color: var(--danger) !important; }
.row-2 { display: grid; gap: 0 1rem; } @media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.notice { border-radius: var(--r-md); padding: 1rem 1.25rem; margin: 0 0 1.25rem; background: var(--blush); border-left: 6px solid var(--pink); }
.notice p:last-child { margin-bottom: 0; }
.notice-error { background: #fdecea; border-color: var(--danger); } .notice-ok { background: #e8f8ee; border-color: var(--ok); }
.notice-demo { background: #fff6cf; border-color: #d9a300; }
.notice h2, .notice h3 { font-size: 1.125rem; margin-bottom: .25rem; }

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; border: 2px solid #cdbfd4; border-radius: 999px; background: #fff; }
.qty button { width: 46px; height: 46px; border: 0; background: transparent; border-radius: 50%; font-size: 1.375rem; line-height: 1; color: var(--plum); cursor: pointer; }
.qty button:hover:not([disabled]) { background: var(--blush); } .qty button[disabled] { color: #b9aebf; cursor: not-allowed; }
.qty output, .qty input { width: 2.5rem; text-align: center; font-weight: 600; border: 0; min-height: 0; padding: 0; background: transparent; }

/* Product page */
.crumbs { font-size: .9375rem; padding: 1rem 0 0; color: var(--muted); } .crumbs a { color: var(--muted); }
.product { display: grid; gap: 1.5rem; padding-top: 1rem; }
@media (min-width: 800px) { .product { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; } .product-media { position: sticky; top: 150px; } }
.product-media { border-radius: var(--r-lg); overflow: hidden; background: var(--blush); aspect-ratio: 1; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); margin-bottom: .25em; }
.product .price { font-size: 1.5rem; margin-bottom: 1rem; }
.options { border: 0; padding: 0; margin: 0 0 1.25rem; }
.options-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.option input { position: absolute; opacity: 0; }
.option span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.125rem; border-radius: 999px; border: 2px solid #cdbfd4; font-weight: 500; cursor: pointer; }
.option input:checked + span { background: var(--plum); border-color: var(--plum); color: #fff; }
.option input:focus-visible + span { outline: 3px solid var(--plum); outline-offset: 3px; }
.option input:disabled + span { color: #8d8394; background: #f4f0f6; text-decoration: line-through; cursor: not-allowed; }
.buy-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.buy-row .btn { flex: 1 1 200px; min-height: 56px; }
details.info { border-top: 2px solid var(--line); } details.info:last-of-type { border-bottom: 2px solid var(--line); }
details.info summary { cursor: pointer; padding: 1rem 0; font: 700 1.0625rem var(--display); color: var(--plum); list-style: none; display: flex; justify-content: space-between; min-height: 48px; align-items: center; }
details.info summary::-webkit-details-marker { display: none; }
details.info summary::after { content: '+'; font-size: 1.5rem; font-weight: 400; } details.info[open] summary::after { content: '–'; }
details.info div { padding-bottom: 1rem; white-space: pre-line; }

/* Basket lines (drawer + page) */
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 76px 1fr; gap: .875rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.line img { width: 76px; height: 76px; border-radius: var(--r-sm); object-fit: cover; background: var(--blush); }
.line-top { display: flex; justify-content: space-between; gap: .75rem; }
.line-name { font-weight: 600; color: var(--plum); text-decoration: none; } .line-name:hover { text-decoration: underline; }
.line-meta { font-size: .9375rem; color: var(--muted); margin: 0; }
.line-actions { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; gap: .5rem; }
.line-problem { color: var(--danger); font-weight: 600; font-size: .9375rem; margin: .25rem 0 0; }
.totals { margin: 1rem 0; } .totals div { display: flex; justify-content: space-between; padding: .375rem 0; }
.totals dt { font-weight: 400; } .totals dd { margin: 0; font-weight: 600; }
.totals .grand { border-top: 2px solid var(--plum); margin-top: .5rem; padding-top: .75rem; font-size: 1.25rem; color: var(--plum); } .totals .grand dt { font-weight: 700; }
.free-hint { background: var(--mint); color: #12391f; border-radius: var(--r-sm); padding: .625rem .875rem; font-size: .9375rem; font-weight: 500; margin: 0 0 .75rem; }
.summary-box { background: var(--blush); border-radius: var(--r-lg); padding: 1.5rem; }
.two-col { display: grid; gap: 2rem; } @media (min-width: 900px) { .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; gap: 3rem; } .two-col .summary-box { position: sticky; top: 150px; } }

/* Basket drawer */
dialog.drawer { border: 0; padding: 0; margin: 0 0 0 auto; width: min(100%, 440px); height: 100dvh; max-height: none; max-width: none; background: #fff; color: var(--ink); display: none; flex-direction: column; }
dialog.drawer[open] { display: flex; animation: slide-in .22s ease-out; }
dialog.drawer::backdrop { background: rgba(46, 20, 55, .55); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.375rem; }
.drawer-head .icon-btn { color: var(--plum); } .drawer-head .icon-btn:hover { background: var(--blush); }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 1.25rem; }
.drawer-foot { padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: .625rem; }
.drawer-foot .sub { display: flex; justify-content: space-between; font-weight: 700; color: var(--plum); font-size: 1.125rem; }
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); background: var(--plum); color: #fff; padding: .875rem 1.25rem; border-radius: 999px; z-index: 60; font-weight: 500; max-width: calc(100% - 2rem); }

/* Status pages */
.status { max-width: 640px; margin-inline: auto; text-align: center; padding-block: 3rem; }
.status .summary-box { text-align: left; margin-top: 1.5rem; }
.status-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.25rem; font-size: 2.5rem; background: var(--mint); color: #12391f; }
.status-icon.warn { background: var(--yellow); color: var(--plum); } .status-icon.wait { background: var(--lilac); color: var(--plum); }

/* Content pages */
.prose { max-width: 70ch; } .prose h2 { margin-top: 1.75em; font-size: 1.5rem; } .prose ul { padding-left: 1.25rem; } .prose li { margin-bottom: .375rem; }
.todo { background: #fff6cf; border-radius: 6px; padding: .125rem .375rem; font-weight: 500; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Footer */
.site-footer { background: var(--plum); color: #eadcf0; margin-top: 3rem; padding: 2.5rem 0 2rem; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.footer-grid { display: grid; gap: 1.5rem; } @media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1.0625rem; margin-bottom: .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: #fff; display: inline-flex; min-height: 44px; align-items: center; }
.site-footer p { font-size: .9375rem; }
.footer-base { border-top: 1px solid var(--plum-soft); margin-top: 1.5rem; padding-top: 1.25rem; font-size: .875rem; color: #cbb8d4; }
.test-banner { background: #fff6cf; color: #4a3800; text-align: center; font-size: .875rem; font-weight: 600; padding: .375rem 1rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.row-2 label .hint { display: inline; margin-left: .25rem; }
