/* ==========================================================================
   Tokens
   A field journal kept in a forest: blush-stone paper, understory green-black,
   plum and bark from the woods at dusk. Product photographs bring the color.
   ========================================================================== */

:root {
  --understory: #1A2117;
  --moss: #2A3425;
  --lichen: #E8DCD3;   /* page background: blush stone */
  --paper: #F2EAE4;    /* lighter panels behind photos and in drawers */
  --bark: #33261F;
  --bark-soft: #5E5346;
  --cherry: #4E2633;
  --cherry-deep: #2A161D;
  --wine: #7E3D45;
  --ivory: #F0ECE1;
  --ivory-soft: rgba(240, 236, 225, 0.74);
  --forest-ink: #1D2619;
  --rule: rgba(51, 38, 31, 0.22);
  --rule-light: rgba(240, 236, 225, 0.22);
  --focus: #4E2633;
  /* a faint paper grain and long fibres over the light background, like the storybook cards */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.24 0 0 0 0 0.2 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.06' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0 0.26 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='600' height='600' filter='url(%23f)'/%3E%3C/svg%3E");
  /* the same grain pre-drawn as a tile (assets/img/grain.png), for things that move in 3D, like the lock box:
     the live SVG noise above is redrawn on every frame there, which made the box stutter as it appeared */
  --grain-tile: url("/assets/img/grain.png");

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --ui: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  /* type scale, ratio ~1.333 */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-md: 1.375rem;
  --t-lg: 1.875rem;
  --t-xl: clamp(2.25rem, 3.6vw, 3.25rem);
  --t-2xl: clamp(2.9rem, 6.4vw, 6.25rem);
  --t-hero: clamp(2.6rem, 8.4vw, 10rem);

  --gutter: clamp(1rem, 4.4vw, 4.5rem);
  --ease-out: cubic-bezier(0.22, 0.8, 0.2, 1);
  --header-h: 4rem;
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
html.has-dialog { overflow: hidden; }
body {
  margin: 0;
  background: var(--grain), var(--lichen);
  color: var(--bark);
  font-family: var(--ui);
  font-size: var(--t-base);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--cherry); color: var(--ivory); }
.on-dark :focus-visible, .masthead.is-over-scene :focus-visible, dialog.menu :focus-visible { outline-color: var(--ivory); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ivory); color: var(--bark); padding: 0.75rem 1rem;
}
.skip-link:focus { top: 1rem; }

.display { font-family: var(--display); font-weight: 400; font-optical-sizing: auto; line-height: 0.98; letter-spacing: -0.012em; }

.link-quiet {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--t-sm); letter-spacing: 0.02em; text-decoration: underline; text-decoration-color: var(--cherry);
}
.link-quiet:hover { color: var(--cherry); }
.on-dark .link-quiet { text-decoration-color: currentColor; }
.on-dark .link-quiet:hover { color: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; padding: 0.85rem 1.75rem;
  border: 1px solid currentColor; border-radius: 0; background: transparent;
  font-family: var(--ui); font-weight: 500; font-size: var(--t-sm); letter-spacing: 0.04em;
  text-decoration: none; transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { background: var(--cherry); color: var(--ivory); border-color: var(--cherry); }
.btn--solid { background: var(--cherry); color: var(--ivory); border-color: var(--cherry); }
.btn--solid:hover { background: var(--cherry-deep); border-color: var(--cherry-deep); }
.btn--light { color: var(--ivory); }
.btn--light:hover { background: var(--ivory); color: var(--bark); border-color: var(--ivory); }
.btn--wide { width: 100%; }
.btn:disabled, .btn.is-disabled { background: transparent; color: var(--bark-soft); border-color: var(--rule); cursor: not-allowed; pointer-events: none; }

.stock { font-size: var(--t-sm); display: flex; align-items: center; gap: 0.5rem; }
.stock::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.stock--in { color: #44573A; }
.stock--low { color: var(--cherry); }
.stock--out { color: var(--bark-soft); }

.form-error, .drawer__error { color: var(--wine); font-size: var(--t-sm); min-height: 0; }
.form-error:empty, .drawer__error:empty { display: none; }

.placeholder-tag {
  display: inline-block; margin-bottom: 1rem; padding: 0.2rem 0.6rem;
  border: 1px dashed currentColor; font-size: var(--t-xs); letter-spacing: 0.04em;
}

/* ==========================================================================
   Header
   ========================================================================== */

.masthead {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  color: var(--bark);
  /* nearly solid rather than a blur of what's behind, which had to be redrawn on every frame of scrolling */
  background: color-mix(in srgb, var(--lichen) 96%, transparent);
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.6s, color 0.6s, border-color 0.6s;
}
.masthead::before {
  content: ""; position: absolute; inset: 0 0 -3rem; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(rgba(34, 26, 16, 0.55), rgba(34, 26, 16, 0));   /* warm bark shade, not green */
  transition: opacity 0.6s;
}
.masthead.is-over-scene { background: transparent; color: var(--ivory); border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.masthead.is-over-scene::before { opacity: 1; }

/* the header, as hijab and fashion houses set theirs: Menu (the side menu) and the main links on the left, the logo
   in the middle, Search, Account, Favorites and Bag together as fine icons on the right (assets/js/ui/chrome.js) */
.masthead__left { display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); min-width: 0; }
.masthead__nav { display: flex; align-items: center; gap: clamp(0.9rem, 1.8vw, 2rem); white-space: nowrap; transition: opacity 0.5s, visibility 0.5s; }
.masthead__nav a, .masthead__menu {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  border: 0; background: none; color: inherit; font-size: var(--t-sm); font-weight: 500; letter-spacing: 0.03em; text-decoration: none;
}
.masthead__nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--cherry); text-decoration-thickness: 2px; }
.masthead__nav a:hover, .masthead__menu:hover .masthead__menu-word { text-decoration: underline; }
.masthead__menu { gap: 0.55rem; cursor: pointer; }
.masthead__menu svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
/* over the forest on the home page, the links wait until the hijabs begin */
.masthead.is-over-scene .masthead__nav { opacity: 0; visibility: hidden; }
.masthead__mark {
  font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  transition: opacity 0.6s;
}
.masthead.is-over-scene .masthead__mark { opacity: 0; visibility: hidden; }
.masthead__mark img { display: block; height: 2.6rem; width: auto; }

/* the tools: fine-line icons, each named for screen readers; a count shows as a small cherry badge only once
   something is in Favorites or the Bag */
.masthead__tools { display: flex; align-items: center; justify-content: flex-end; gap: 0.2rem; }
.masthead__tools > * { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px;
  padding: 0; border: 0; background: none; color: inherit; text-decoration: none; cursor: pointer; }
.masthead__tools svg { flex: none; width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width 0.2s; }
.masthead__tools > *:hover svg { stroke-width: 2; }
.masthead__word, .masthead__acct-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.masthead__count {
  position: absolute; top: 3px; right: 1px; display: inline-grid; place-items: center; min-width: 1.05rem; height: 1.05rem; padding: 0 0.2rem;
  border-radius: 1rem; background: var(--cherry); color: var(--ivory); font-size: 0.6rem; font-weight: 500; line-height: 1;
}
.masthead__count:not(.has-items) { display: none; }
.masthead__fav[aria-current="page"] svg { fill: currentColor; }

/* small laptops and tablets: Menu, the logo and the icons on top, the links centred on a second row underneath
   (the page moves down with --header-h) */
@media (min-width: 761px) and (max-width: 1100px) {
  :root { --header-h: 6.25rem; }
  .masthead { grid-template-rows: 3.5rem 2.75rem; }
  .masthead__left { display: contents; }
  .masthead__menu { grid-column: 1; grid-row: 1; justify-self: start; }
  .masthead__mark { grid-column: 2; grid-row: 1; }
  .masthead__tools { grid-column: 3; grid-row: 1; }
  .masthead__nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; padding: 0 0 0.35rem; gap: clamp(1.25rem, 3.5vw, 2.5rem); }
  .masthead__nav a { min-height: 36px; }
}
/* phones: the links live in the side menu */
@media (max-width: 760px) {
  .masthead__nav { display: none; }
  .masthead__mark { font-size: 1.15rem; }
}
/* small phones: Menu and the logo together on the left, so the four icons have room on the right */
@media (max-width: 480px) {
  .masthead { grid-template-columns: auto auto 1fr; gap: 0.35rem; }
  .masthead__menu-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .masthead__menu { width: 40px; justify-content: flex-start; }
  .masthead__mark img { height: 2.1rem; }
  .masthead__tools { gap: 0; }
  .masthead__tools > * { width: 40px; }
}

/* ==========================================================================
   Dialogs: menu, bag drawer, quick view, lightbox
   ========================================================================== */

dialog { padding: 0; border: 0; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(18, 23, 15, 0.5); animation: fade-in 0.4s ease both; }
dialog.is-closing::backdrop { animation: fade-out 0.35s ease both; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes slide-in-right { from { transform: translateX(100%); } }
@keyframes slide-out-right { to { transform: translateX(100%); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes sink-out { to { opacity: 0; transform: translateY(24px); } }

/* menu */
/* the side menu, sliding in from the left on every screen: dark cherry velvet, the main pages in Bodoni italic, a
   gold divider, then the rest in small spaced capitals */
@keyframes slide-in-left { from { transform: translateX(-100%); } }
@keyframes slide-out-left { to { transform: translateX(-100%); } }
.menu { position: fixed; inset: 0 auto 0 0; width: min(25rem, 88vw); height: 100%; margin: 0; color: #F2E6D2; animation: slide-in-left 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  background: var(--grain), radial-gradient(ellipse 120% 70% at 30% 30%, #4A0D1A, #2A0710 60%, #14030A); box-shadow: 12px 0 40px -18px rgba(10, 2, 4, 0.6); }
.menu.is-closing { animation: slide-out-left 0.35s ease both; }
.menu__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 1.6rem; min-height: 100%; padding: 1rem clamp(1.5rem, 5vw, 2.5rem) 2.5rem; text-align: left; }
.menu__close { align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none; font-size: var(--t-sm); font-weight: 500; letter-spacing: 0.03em; }
.menu__kicker { margin: 0.4rem 0 -0.4rem; font: 500 0.68rem/1 var(--ui); letter-spacing: 0.3em; text-transform: uppercase; color: #C9A86A; }
.menu__nav { display: grid; justify-items: start; gap: 1.4rem; }
.menu__links a { display: block; padding: 0.35rem 0; font: italic 400 clamp(1.55rem, 6.6vw, 2rem)/1.15 var(--display); color: #F2E6D2; text-decoration: none; }
.menu__links a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.menu__rule { width: 9rem; height: 1px; background: linear-gradient(90deg, #C9A86A, transparent); }
.menu__small a, .menu__small .menu__acct { display: block; padding: 0.6rem 0; font: 500 0.78rem/1 var(--ui); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(242, 230, 210, 0.82); text-decoration: none; }
.menu__small .menu__acct { border: 0; background: none; cursor: pointer; text-align: left; }
.menu__small a:hover, .menu__small .menu__acct:hover { color: #fff; }
.menu__search { display: grid; gap: 0.5rem; width: 100%; max-width: 26rem; text-align: left; font-size: var(--t-sm); color: rgba(242, 230, 210, 0.7); }
.menu__search input { min-height: 52px; padding: 0 1rem; background: transparent; border: 1px solid rgba(242, 230, 210, 0.3); color: #F2E6D2; }
.menu__bag { margin-top: auto; min-height: 52px; padding: 0 1.5rem; border: 1px solid #C9A86A; background: none; color: #F2E6D2; font-weight: 500; }

/* bag drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0 0 0 auto; width: min(29rem, 100%); height: 100%; height: 100dvh;
  background: var(--paper); color: var(--bark);
  animation: slide-in-right 0.55s var(--ease-out) both;
}
.drawer.is-closing { animation: slide-out-right 0.4s ease-in both; }
.drawer__inner { display: flex; flex-direction: column; height: 100%; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--rule); }
.drawer__title { font-family: var(--display); font-weight: 400; font-size: var(--t-lg); }
.drawer__close { min-height: 44px; border: 0; background: none; font-size: var(--t-sm); font-weight: 500; text-decoration: underline; }
/* the gift bouquet beside "Your bag" (assets/js/ui/bouquet.js): one more flower for every hijab added.
   Everything eases in slowly and settles, with no bounce: stems draw up, leaves unfold, buds unfurl */
.drawer__heading { display: grid; gap: 0.15rem; }
.drawer__sweet { font-family: var(--display); font-style: italic; font-size: var(--t-sm); color: var(--cherry); line-height: 1.3; }
.drawer__sweet:empty { display: none; }
.bouquet { --grow: cubic-bezier(0.22, 0.8, 0.2, 1); flex: none; width: 6.4rem; height: 5.9rem; margin: -0.8rem auto -0.8rem 0.4rem; overflow: visible; }
.bouquet__stem { fill: none; stroke: #7F9370; stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.bouquet__leaf { fill: #93A77F; }
.bouquet__thorn { fill: #5F7650; opacity: 0; }
.bouquet__leaf, .bouquet__bloom, .bouquet__filler { transform-box: fill-box; transform-origin: center bottom; }
.bouquet__leaf, .bouquet__filler { transform: scale(0); }
.bouquet__bloom { transform: scale(0.15) rotate(-24deg); opacity: 0; }
.bouquet__bow { opacity: 0; transition: opacity 0.6s; }
.bouquet.has-flowers .bouquet__bow { opacity: 1; }
.bouquet__flower.is-grown .bouquet__stem { opacity: 1; stroke-dashoffset: 0; transition: opacity 0s calc(var(--d, 0s) + 0.2s), stroke-dashoffset 1.1s var(--grow) calc(var(--d, 0s) + 0.2s); }
.bouquet__flower.is-grown .bouquet__thorn { opacity: 1; transition: opacity 0.5s calc(var(--d, 0s) + 0.9s); }
.bouquet__flower.is-grown .bouquet__leaf { transform: none; transition: transform 0.8s var(--grow) calc(var(--d, 0s) + 0.75s); }
.bouquet__flower.is-grown .bouquet__bloom { transform: none; opacity: 1; transition: transform 1.2s var(--grow) calc(var(--d, 0s) + 1s), opacity 0.5s calc(var(--d, 0s) + 1s); }
.bouquet__filler.is-grown { transform: none; transition: transform 1.3s var(--grow) calc(var(--d, 0s) + 0.6s); }
@media (prefers-reduced-motion: reduce) { .bouquet * { transition: none !important; } }
.drawer__dev { margin: 1rem 1.5rem 0; padding: 0.75rem 1rem; background: var(--lichen); font-size: var(--t-xs); line-height: 1.5; }
.drawer__body { flex: 1; overflow-y: auto; padding: 0.5rem 1.5rem; }
.drawer__empty { display: grid; gap: 0.5rem; justify-items: start; padding: 2rem 0; font-family: var(--display); font-size: var(--t-md); }
.drawer__error { margin: 0 1.5rem 0.75rem; }
.drawer__foot { padding: 1.25rem 1.5rem 1.5rem; border-top: 1px solid var(--rule); display: grid; gap: 0.75rem; }
.drawer__foot:empty { display: none; }
.drawer__sums { display: grid; gap: 0.35rem; }
.drawer__row { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--t-sm); }
.drawer__row dd { margin: 0; }
.drawer__row--save { color: var(--cherry); }
.drawer__row--total { margin-top: 0.3rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-family: var(--display); font-size: var(--t-md); font-weight: 600; }
.drawer__hint { padding: 0.6rem 0.8rem; background: var(--lichen); color: var(--cherry); font-size: var(--t-xs); }
.bag-line__unit s { margin-left: 0.3rem; }

/* prices: sale price, struck regular price, saving */
.price-now { color: var(--cherry); }
.price-was { color: var(--bark-soft); font-size: 0.85em; }
.price-save { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; background: var(--cherry); color: var(--ivory); font-family: var(--ui); font-size: var(--t-xs); letter-spacing: 0.02em; vertical-align: middle; }
.drawer__note { font-size: var(--t-xs); color: var(--bark-soft); }

.bag-line { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); transition: opacity 0.3s; }
.bag-line.is-pending { opacity: 0.45; }
.bag-line__img { display: block; aspect-ratio: 4 / 5; background: var(--lichen); overflow: hidden; }
.bag-line__img img { width: 100%; height: 100%; object-fit: cover; }
.bag-line__name { font-family: var(--display); font-size: 1.2rem; text-decoration: none; line-height: 1.2; }
.bag-line__name:hover { text-decoration: underline; }
.bag-line__variant, .bag-line__unit { font-size: var(--t-xs); color: var(--bark-soft); }
.bag-line__warn { font-size: var(--t-xs); color: var(--wine); }
.bag-line__end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.bag-line__total { font-size: var(--t-sm); }
.bag-line__remove { min-height: 44px; padding: 0; border: 0; background: none; font-size: var(--t-xs); text-decoration: underline; color: var(--bark-soft); }

.qty { display: inline-flex; align-items: center; margin-top: 0.5rem; border: 1px solid var(--rule); }
.qty__btn { width: 44px; height: 44px; border: 0; background: none; font-size: 1.1rem; }
.qty__btn:hover:not(:disabled) { background: var(--lichen); }
.qty__btn:disabled { color: var(--rule); cursor: not-allowed; }
.qty__value, .qty input { min-width: 2.25rem; text-align: center; font-size: var(--t-sm); }
.qty input { width: 3rem; height: 44px; border: 0; background: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* quick view */
.quick {
  width: min(62rem, calc(100% - 2rem)); margin: auto; background: var(--paper); color: var(--bark);
  animation: rise-in 0.5s var(--ease-out) both;
}
.quick.is-closing { animation: sink-out 0.3s ease-in both; }
.quick__inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; max-height: min(90dvh, 52rem); }
.quick__media { position: relative; background: #fff; min-height: 0; aspect-ratio: 4 / 5; }
.quick__media img { width: 100%; height: 100%; object-fit: contain; }
.quick__info { display: flex; flex-direction: column; gap: 0.9rem; padding: clamp(1.5rem, 4vw, 3rem); overflow-y: auto; }
.quick__close { position: absolute; top: 0.5rem; right: 1rem; z-index: 2; min-height: 44px; border: 0; background: none; font-size: var(--t-sm); font-weight: 500; text-decoration: underline; }
.quick__kind { font-size: var(--t-sm); color: var(--bark-soft); margin-top: 1.5rem; }
.quick__name { font-family: var(--display); font-weight: 400; font-size: var(--t-xl); line-height: 1; }
.quick__price { font-size: var(--t-md); color: var(--cherry); }
.quick__colour { font-size: var(--t-sm); }
.quick__form { display: grid; gap: 1rem; margin-top: 0.5rem; }
@media (max-width: 720px) {
  .quick { width: 100%; margin: auto 0 0; max-height: 92dvh; }
  .quick__inner { grid-template-columns: 1fr; max-height: 92dvh; overflow-y: auto; }
  .quick__media { position: relative; aspect-ratio: auto; height: 44dvh; }
  .quick__info { overflow: visible; }
}

/* option pickers */
.picker { border: 0; margin: 0; padding: 0; }
.picker__legend { padding: 0; margin-bottom: 0.5rem; font-size: var(--t-sm); }
.picker__value { color: var(--bark-soft); }
.picker__values { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.picker__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.picker__chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--rule); font-size: var(--t-sm); cursor: pointer; }
.picker__input:checked + .picker__chip { border-color: var(--cherry); background: var(--cherry); color: var(--ivory); }
.picker__input:focus-visible + .picker__chip { outline: 2px solid var(--focus); outline-offset: 3px; }
.picker__chip.is-unavailable { color: var(--bark-soft); text-decoration: line-through; }

/* development notice */
.dev-notice__pill {
  position: fixed; right: var(--gutter); top: calc(var(--header-h) + 0.75rem); z-index: 45; min-height: 36px; padding: 0 0.9rem;
  border: 1px solid var(--ivory); background: var(--cherry); color: var(--ivory);
  font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.03em;
}
.dev-notice__panel {
  position: fixed; inset: calc(var(--header-h) + 3.5rem) var(--gutter) auto auto; margin: 0; width: min(24rem, calc(100% - 2rem));
  padding: 1.25rem; border: 1px solid var(--rule); background: var(--paper); color: var(--bark);
  font-size: var(--t-sm); line-height: 1.55;
}
.dev-notice__panel p + p { margin-top: 0.6rem; }

/* ==========================================================================
   Product tile, photo slots
   ========================================================================== */

.tile { --ratio: 4 / 5; position: relative; min-width: 0; container-type: inline-size; }
.tile__media { position: relative; display: block; aspect-ratio: var(--ratio); overflow: hidden; background: var(--paper); }
.tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.9s ease, transform 1.4s var(--ease-out); }
.tile__img--alt { opacity: 0; }
@media (hover: hover) {
  .tile:hover .tile__img--alt, .tile:focus-within .tile__img--alt { opacity: 1; }
  .tile:hover .tile__img { transform: scale(1.025); }
}
/* a sold-out hijab keeps its photograph whole; the flag says it's sold out */
.tile__flag { position: absolute; left: 0.75rem; top: 0.75rem; z-index: 1; padding: 0.2rem 0.6rem; background: var(--cherry); color: var(--ivory); font-size: var(--t-xs); }

.tile__caption { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: baseline; padding-top: 0.85rem; }
.tile__name { grid-column: 1; font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 1.9vw, 1.75rem); line-height: 1.15; }
.tile__name a { text-decoration: none; }
.tile__name a:hover { text-decoration: underline; }
.tile__name a::after { content: ""; } /* keeps the name the only link in the caption */
.tile__price { grid-column: 2; grid-row: 1; font-size: var(--t-sm); white-space: nowrap; color: var(--cherry); }
.tile__price .price-was { margin-left: 0.3rem; }
.tile__kind { grid-column: 1; font-size: var(--t-xs); color: var(--bark-soft); letter-spacing: 0.02em; }

/* The name written beside the photo, in the gutter, letter by letter (tile.js `whisper`).
   Set sideways so it fits the gap between cards and never covers the fabric or a neighbor;
   it reads left to right along the word. Hover (or focus) writes it in; leaving takes it back
   from the last letter. On touch screens the first tap on a photo writes it (chrome.js). */
.tile__whisper {
  --gap: var(--tile-gap, 1rem);
  position: absolute; top: 0.5rem; left: 100%;
  margin-left: calc((var(--gap) - 1em) / 2);
  writing-mode: vertical-rl;
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(0.7rem, calc(var(--gap) * 0.55), 1.2rem); line-height: 1; letter-spacing: 0.05em;
  color: var(--bark); white-space: nowrap; pointer-events: none;
}
.tile__whisper > span {
  display: inline-block; opacity: 0; transform: translateY(-0.4em); filter: blur(3px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out), filter 0.35s ease;
  transition-delay: calc((var(--n) - var(--i)) * 18ms);
}
.tile.is-named .tile__whisper > span,
.tile:focus-within .tile__whisper > span {
  opacity: 1; transform: none; filter: none;
  transition-duration: 0.6s, 0.8s, 0.6s;
  transition-delay: calc(var(--i) * 55ms + 60ms);
}
@media (hover: hover) {
  .tile:hover .tile__whisper > span {
    opacity: 1; transform: none; filter: none;
    transition-duration: 0.6s, 0.8s, 0.6s;
    transition-delay: calc(var(--i) * 55ms + 60ms);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tile__whisper > span { transform: none; filter: none; transition-delay: 0s !important; }
}
.tile__quick {
  grid-column: 2; grid-row: 2; justify-self: end; min-height: 44px; padding: 0;
  border: 0; background: none; font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.03em; text-decoration: underline;
}
@media (hover: hover) {
  .tile__quick { opacity: 0; transition: opacity 0.35s; }
  .tile:hover .tile__quick, .tile:focus-within .tile__quick { opacity: 1; }
}

/* the fabric unrolls downward as it enters the page */
.motion-ok .tile__media[data-reveal] { clip-path: inset(0 0 100% 0); transition: clip-path 1.6s var(--ease-out); }
.motion-ok .tile__media[data-reveal].is-in { clip-path: inset(0 0 0 0); }

.photo-slot {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 1rem;
  background: var(--paper); color: var(--bark-soft);
  outline: 1px solid var(--rule); outline-offset: -0.75rem;
}
.photo-slot__drawing { width: min(38%, 9rem); height: auto; stroke-width: 0.6; opacity: 0.75; }
.photo-slot__drawing .vein { stroke-width: 0.35; }
.photo-slot__label { font-family: var(--display); font-style: italic; font-size: var(--t-sm); color: var(--bark-soft); }

.media-slot {
  display: grid; place-items: center; align-content: center; gap: 0.35rem; padding: 1rem; text-align: center;
  border: 1px dashed currentColor; color: var(--ivory-soft); font-size: var(--t-sm);
}
.media-slot strong { font-family: var(--display); font-weight: 400; font-style: italic; font-size: var(--t-md); color: var(--ivory); }

.botanical path, .botanical circle { stroke-width: 0.55; }
.botanical .vein { stroke-width: 0.32; opacity: 0.75; }

/* ==========================================================================
   Closing credits
   ========================================================================== */

.credits { background: var(--understory); color: var(--ivory); padding: clamp(4rem, 9vw, 8rem) var(--gutter) 2.5rem; }
.credits a, .credits button { color: var(--ivory); }
.credits__inner { max-width: 46rem; margin: 0 auto; }
.credits__roll { display: grid; gap: 1.1rem; }
.credits__row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: baseline; }
.credits__row dt { text-align: right; font-family: var(--display); font-style: italic; color: var(--ivory-soft); }
.credits__row dd { margin: 0; font-size: var(--t-sm); letter-spacing: 0.02em; line-height: 1.9; }
.credits__row a { text-decoration: none; border-bottom: 1px solid var(--rule-light); }
.credits__row a:hover { border-color: var(--ivory); }
.credits__bag { padding: 0; border: 0; border-bottom: 1px solid var(--rule-light); background: none; font-size: var(--t-sm); letter-spacing: 0.02em; }
.credits__fin { display: flex; justify-content: center; gap: 1.5rem; margin-top: clamp(4rem, 8vw, 7rem); font-family: var(--display); font-size: var(--t-sm); color: var(--ivory-soft); }

@media (max-width: 520px) {
  .credits__row { grid-template-columns: 1fr; gap: 0.15rem; text-align: center; }
  .credits__row dt { text-align: center; }
}

/* ==========================================================================
   Forest scenes (shared by the opening and closing)
   ========================================================================== */

.forest { position: absolute; inset: 0; overflow: hidden; }
.forest__layer { position: absolute; inset: -3%; transform-origin: 50% 64%; }
.motion-ok .forest__layer { will-change: transform; }
.forest__layer canvas { width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.forest__layer canvas.is-drawn { opacity: 1; }
.forest__mark {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  padding: 0 var(--gutter);
}
.wordmark {
  margin: 0 0 9vh; font-family: var(--display); font-weight: 500; font-optical-sizing: auto;
  font-size: var(--t-hero); line-height: 1; letter-spacing: -0.02em; color: var(--forest-ink);
  white-space: nowrap; text-align: center;
}
.wordmark img { width: min(70vw, 52rem); height: auto; }
/* With scripts on, the typed name never shows: the logo image (home.js) takes its place and fades in
   out of the mist, so the plain text would only flash on the green while the page loads. The text
   stays in the page for screen readers, and shows normally if scripts are off. */
.js .forest__mark .wordmark { color: transparent; }
.mist-letter { display: inline-block; will-change: opacity, filter, transform; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}


/* narrow cards (two-up on phones): name, price and Quick view stack instead of crowding into
   the neighboring card */
@container (max-width: 300px) {
  .tile__caption { grid-template-columns: minmax(0, 1fr); }
  .tile__price, .tile__quick { grid-column: 1; grid-row: auto; justify-self: start; }
  .tile__price { white-space: normal; }
}

/* ==========================================================================
   Launch offer pop-up (assets/js/ui/launch-popup.js): once per visitor
   ========================================================================== */

.offer {
  width: min(27rem, calc(100% - 2rem)); margin: auto; overflow: visible; color: var(--ivory);
  background: radial-gradient(ellipse 90% 75% at 50% 0%, #5a2232, var(--cherry-deep) 72%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); animation: rise-in 0.55s var(--ease-out) both;
}
.offer.is-closing { animation: sink-out 0.3s ease-in both; }
.offer__inner { position: relative; display: grid; justify-items: center; gap: 0.55rem; padding: clamp(2rem, 5vw, 2.4rem) clamp(1.5rem, 6vw, 2.5rem) 1.4rem; text-align: center; }
/* the thin gold line used on the story pictures */
.offer__inner::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(214, 178, 98, 0.75); pointer-events: none; }
.offer__close { position: absolute; top: 0.9rem; right: 1rem; z-index: 1; width: 44px; height: 44px; border: 0; background: none; color: var(--ivory-soft); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.offer__close:hover { color: var(--ivory); }
.offer__kicker { font-size: var(--t-xs); letter-spacing: 0.32em; text-transform: uppercase; color: var(--ivory-soft); }
.offer__title { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 7vw, 2.8rem); line-height: 1; }
.offer__pct { font-size: 1.55em; color: #e8cf8f; }
.offer__text { font-family: var(--display); font-size: var(--t-md); line-height: 1.4; color: var(--ivory-soft); max-width: 22rem; }
.offer__text strong { color: var(--ivory); font-weight: 600; }
.offer__text s { opacity: 0.7; }
.offer__bundles { display: grid; gap: 0.15rem; margin-top: 0.2rem; padding: 0.6rem 1.1rem; border: 1px solid rgba(214, 178, 98, 0.75); font-size: var(--t-sm); letter-spacing: 0.04em; color: var(--ivory-soft); }
.offer__bundles strong { font-family: var(--display); font-size: var(--t-md); font-weight: 400; letter-spacing: 0; color: #e8cf8f; }
.offer__cta { margin-top: 0.4rem; border-color: var(--ivory); }
.offer__later { min-height: 44px; border: 0; background: none; color: var(--ivory-soft); font-size: var(--t-sm); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.offer::backdrop { background: rgba(12, 16, 10, 0.6); backdrop-filter: blur(3px); }

/* Favorites (assets/js/favorites.js): the heart on each hijab, the header count and the product-page button */
.fav { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: 0; background: none; color: var(--cherry); cursor: pointer; }
.fav svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; transition: fill 0.25s, transform 0.3s var(--ease-out); }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.fav:hover svg { transform: scale(1.1); }
.fav.is-popping svg { animation: fav-pop 0.45s var(--ease-out); }
@keyframes fav-pop { 40% { transform: scale(1.35); } }
.tile__fav { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(242, 234, 228, 0.88); }
.fav--label { min-height: 44px; padding: 0; font-size: var(--t-sm); font-weight: 500; color: var(--bark); }
.fav--label svg { color: var(--cherry); }
.favs__note { margin: -0.5rem 0 1.75rem; color: var(--bark-soft); font-size: var(--t-sm); }
.favs__empty { display: grid; gap: 1rem; justify-items: start; }
.fav-spark { position: fixed; z-index: 200; width: 0; height: 0; pointer-events: none; animation: fav-twinkle 0.8s ease-out both; }
.fav-spark svg { position: absolute; left: -6.5px; top: -6.5px; width: 13px; height: 13px; max-width: none; fill: #D6B262; transform: scale(var(--s, 1)); }
@keyframes fav-twinkle {
  0% { transform: translate(0, 0) scale(0); opacity: 0; }
  40% { transform: translate(var(--x), var(--y)) scale(1); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(0.2) rotate(90deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .fav svg { transition: none; animation: none !important; } }

/* ==========================================================================
   Account (assets/js/ui/account.js) and the inner circle (assets/js/ui/inner-circle.js):
   dark cherry velvet, old letter paper and gold, like the rest of the house
   ========================================================================== */

.circle-kicker { margin: 0; font: 500 0.7rem/1 var(--ui); letter-spacing: 0.28em; text-transform: uppercase; color: #C9A86A; }

/* the form: an underlined line, like writing on a card */
.circle-form { display: grid; justify-items: center; gap: 0.85rem; width: min(31rem, 100%); color: #F2E6D2; }
.circle-form__switch { display: inline-flex; padding: 3px; border: 1px solid rgba(201, 168, 106, 0.5); border-radius: 2rem; }
.circle-form__switch label { position: relative; cursor: pointer; }
.circle-form__switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.circle-form__switch span { display: block; padding: 0.55rem 1.2rem; border-radius: 2rem; font: 500 0.72rem var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(242, 230, 210, 0.75); }
.circle-form__switch input:checked + span { background: #F2E6D2; color: #5A1220; }
.circle-form__switch input:focus-visible + span { outline: 2px solid #C9A86A; outline-offset: 2px; }
.circle-form__join { display: flex; width: 100%; border-bottom: 1px solid rgba(242, 230, 210, 0.6); }
.circle-form__join input { flex: 1; min-width: 0; min-height: 52px; padding: 0 0.2rem; border: 0; background: none; color: inherit; font: italic 400 1.08rem var(--display); }
.circle-form__join input::placeholder { color: rgba(242, 230, 210, 0.55); }
.circle-form__join input:focus-visible { outline: none; }
.circle-form__join:focus-within { border-bottom-color: #C9A86A; }
.circle-form__join button { flex: none; min-height: 52px; padding: 0 0.2rem 0 1rem; border: 0; background: none; color: inherit; cursor: pointer;
  font: 500 0.76rem var(--ui); letter-spacing: 0.2em; text-transform: uppercase; }
.circle-form__join button:hover { color: #fff; }
.circle-form__join button:disabled { opacity: 0.6; cursor: progress; }
.circle-form [hidden] { display: none; }
.circle-form__consent { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; text-align: left; font: 400 0.76rem/1.55 var(--ui); color: rgba(242, 230, 210, 0.8); }
.circle-form__consent input { width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; accent-color: #C9A86A; }
.circle-form__consent a { color: inherit; }
.circle-form__fine { margin: 0; font: 400 0.76rem/1.5 var(--ui); color: rgba(242, 230, 210, 0.6); }
.circle-form__msg { margin: 0; min-height: 1.4em; font: 400 0.85rem/1.5 var(--ui); color: #F0C9A8; text-align: center; }
.circle-form__msg:empty { display: none; }

/* joined: a rose draws itself in, and the welcome */
.circle-done { display: grid; justify-items: center; gap: 0.6rem; text-align: center; color: #F2E6D2; outline: none; }
.circle-rose { width: 92px; color: #C9A86A; }
.circle-rose path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: circle-draw 2.2s ease forwards; }
.circle-rose path:nth-child(2), .circle-rose path:nth-child(3) { animation-delay: 0.5s; }
.circle-rose path:nth-child(n+4) { animation-delay: 0.9s; }
.circle-done.is-still .circle-rose path { animation: none; stroke-dashoffset: 0; }
@keyframes circle-draw { to { stroke-dashoffset: 0; } }
.circle-done__script { margin: 0; font-family: "Pinyon Script", cursive; font-size: 2rem; line-height: 1.1; color: #C9A86A; }
.circle-done__title { margin: 0; font: 400 clamp(1.5rem, 3.4vw, 2.2rem)/1.1 var(--display); color: #FBF1E0; }
.circle-done__text { margin: 0; max-width: 26rem; font: 400 0.9rem/1.6 var(--ui); color: rgba(242, 230, 210, 0.8); }
@media (prefers-reduced-motion: reduce) { .circle-rose path { animation: none; stroke-dashoffset: 0; } }

/* the pop-up: the rose on dark velvet beside a sheet of letter paper */
.circle-pop { width: min(42rem, calc(100% - 2rem)); margin: auto; padding: 0; border: 0; overflow: visible; background: none;
  display: none; grid-template-columns: 0.85fr 1.15fr; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); animation: rise-in 0.6s var(--ease-out) both; }
.circle-pop[open] { display: grid; }
.circle-pop.is-closing { animation: sink-out 0.3s ease-in both; }
.circle-pop::backdrop { background: rgba(20, 4, 8, 0.72); }
.circle-pop__art { display: grid; place-items: center; min-height: 360px; background: var(--grain), radial-gradient(ellipse 80% 70% at 50% 40%, #4A0D1A, #2A0710 60%, #14030A); }
.circle-pop__art .circle-rose { width: 46%; }
.circle-pop__art .circle-rose path { animation-delay: 0.4s; animation-duration: 2.6s; }
.circle-pop__body { position: relative; display: grid; align-content: center; gap: 0.85rem; padding: 2.4rem 1.9rem; color: #2E1A10;
  background: var(--grain), linear-gradient(175deg, #F6EEDD, #E9DCC0); }
.circle-pop__close { position: absolute; top: 0.3rem; right: 0.4rem; width: 2.75rem; height: 2.75rem; border: 0; background: none; font-size: 1.7rem; color: #5A1220; cursor: pointer; }
.circle-pop .circle-kicker { color: #8A5A3A; }
.circle-pop__title { margin: 0; font: 400 clamp(1.7rem, 4vw, 2.2rem)/1.08 var(--display); color: #3A0A12; }
.circle-pop__lede { margin: 0; font: 400 0.92rem/1.55 var(--ui); color: #4A2C22; }
.circle-pop__later { justify-self: start; min-height: 40px; padding: 0; border: 0; background: none; font: 400 0.8rem var(--ui); color: #8A6A52; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* on the paper, the form writes in ink */
.circle-pop .circle-form, .acct .circle-form { justify-items: start; color: #2E1A10; }
.circle-pop .circle-form__join, .acct .circle-form__join { border-bottom-color: rgba(90, 18, 32, 0.5); }
.circle-pop .circle-form__join input::placeholder, .acct .circle-form__join input::placeholder { color: #8A6A52; }
.circle-pop .circle-form__join button, .acct .circle-form__join button { color: #5A1220; }
.circle-pop .circle-form__fine, .acct .circle-form__fine, .circle-pop .circle-form__consent, .acct .circle-form__consent { color: #6B4A3F; }
.circle-pop .circle-form__msg, .acct .circle-form__msg { color: #8A1C2C; text-align: left; }
.circle-pop .circle-form__switch, .acct .circle-form__switch { border-color: rgba(90, 18, 32, 0.4); }
.circle-pop .circle-form__switch span, .acct .circle-form__switch span { color: #6B4A3F; }
.circle-pop .circle-form__switch input:checked + span, .acct .circle-form__switch input:checked + span { background: #5A1220; color: #F6EEDD; }
.circle-pop .circle-done, .acct .circle-done { color: #2E1A10; }
.circle-pop .circle-done__title, .acct .circle-done__title { color: #3A0A12; }
.circle-pop .circle-done__text, .acct .circle-done__text { color: #4A2C22; }
.circle-pop .circle-done__script, .acct .circle-done__script { color: #8A5A3A; }
@media (max-width: 600px) {
  .circle-pop[open] { grid-template-columns: 1fr; }
  .circle-pop__art { min-height: 150px; }
  .circle-pop__art .circle-rose { width: 70px; }
  .circle-pop__body { padding: 1.8rem 1.4rem 1.4rem; }
}

/* the invitation among the hijabs in the shop */
.circle-invite { display: grid; align-content: center; justify-items: center; gap: 0.75rem; aspect-ratio: 3 / 4; padding: 1.5rem; text-align: center;
  background: var(--grain), radial-gradient(ellipse 80% 70% at 50% 40%, #4A0D1A, #2A0710 60%, #14030A); color: #F2E6D2; }
.circle-invite__title { margin: 0; font: 400 clamp(1.3rem, 2.4vw, 1.7rem)/1.1 var(--display); letter-spacing: 0.06em; color: #FBF1E0; }
.circle-invite__text { margin: 0; font: italic 400 1rem/1.5 var(--display); color: rgba(242, 230, 210, 0.85); }
.circle-invite__btn { margin-top: 0.3rem; min-height: 44px; padding: 0 1.2rem; border: 1px solid rgba(242, 230, 210, 0.6); background: none; color: #F2E6D2;
  font: 500 0.72rem var(--ui); letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; }
.circle-invite__btn:hover { background: #F2E6D2; color: #5A1220; }

/* the account panel */
.acct { width: min(54rem, calc(100% - 2rem)); max-height: 92dvh; margin: auto; padding: 0; border: 0; overflow: auto; background: none;
  display: none; grid-template-columns: 0.9fr 1.1fr; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); animation: rise-in 0.5s var(--ease-out) both; }
.acct[open] { display: grid; }
.acct.is-closing { animation: sink-out 0.3s ease-in both; }
.acct::backdrop { background: rgba(20, 4, 8, 0.72); }
.acct [hidden] { display: none; }
.acct__art { position: relative; min-height: 460px; overflow: hidden;
  background: var(--grain), radial-gradient(ellipse 80% 70% at 50% 35%, #4A0D1A, #2A0710 60%, #14030A); }
/* the gold rose drawing itself in, line by line, as the panel opens */
.acct__art svg { position: absolute; left: 50%; top: 50%; width: 74%; transform: translate(-50%, -50%); }
.acct__rose path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.acct[open] .acct__rose path { animation: circle-draw 2.4s ease 0.2s forwards; }
.acct[open] .acct__rose path:nth-child(n+4) { animation-delay: 0.8s; }
@media (prefers-reduced-motion: reduce) { .acct__rose path, .acct[open] .acct__rose path { animation: none; stroke-dashoffset: 0; } }
.acct__card { position: relative; display: grid; align-content: start; gap: 1rem; padding: 2.2rem clamp(1.4rem, 4vw, 2.6rem) 2rem; color: #2E1A10;
  background: var(--grain), linear-gradient(175deg, #F6EEDD, #E9DCC0); }
.acct__close { position: absolute; top: 0.3rem; right: 0.4rem; width: 2.75rem; height: 2.75rem; border: 0; background: none; font-size: 1.7rem; color: #5A1220; cursor: pointer; }
.acct__tabs { display: flex; gap: 1.6rem; border-bottom: 1px solid rgba(90, 18, 32, 0.25); margin-right: 2rem; }
.acct__tabs button { min-height: 44px; padding: 0; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; cursor: pointer;
  font: 500 0.76rem var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: #8A6A52; }
.acct__tabs button[aria-selected="true"] { color: #3A0A12; border-bottom-color: #5A1220; }
.acct__pane { display: grid; gap: 0.9rem; }
.acct__kicker { margin: 0.4rem 0 0; font: 500 0.68rem/1 var(--ui); letter-spacing: 0.26em; text-transform: uppercase; color: #8A5A3A; }
.acct__title { margin: 0; font: 400 clamp(1.7rem, 3vw, 2.2rem)/1.08 var(--display); color: #3A0A12; }
.acct__text { margin: 0; font: 400 0.92rem/1.6 var(--ui); color: #4A2C22; }
.acct__go { display: grid; place-items: center; min-height: 50px; background: #5A1220; color: #F6EEDD; text-decoration: none;
  font: 500 0.8rem var(--ui); letter-spacing: 0.18em; text-transform: uppercase; }
.acct__go:hover { background: #3A0A12; }
.acct__fine { margin: 0; font: 400 0.8rem/1.55 var(--ui); color: #6B4A3F; }
.acct__circle { display: grid; gap: 0.6rem; margin-top: 0.6rem; padding-top: 1rem; border-top: 1px solid rgba(90, 18, 32, 0.2); }
/* the email box, set on the paper like the inner circle's: a fine underline, the label in small capitals */
.acct__form { display: grid; gap: 0.45rem; margin-top: 0.2rem; }
.acct__label { font: 500 0.66rem/1 var(--ui); letter-spacing: 0.22em; text-transform: uppercase; color: #8A5A3A; }
.acct__input { width: 100%; min-height: 48px; padding: 0.55rem 0.1rem; border: 0; border-bottom: 1px solid rgba(90, 18, 32, 0.45); border-radius: 0;
  background: transparent; font: 400 1.02rem var(--ui); color: #2E1A10; }
.acct__input::placeholder { color: #A08670; }
.acct__input:focus { outline: none; border-bottom-color: #5A1220; box-shadow: 0 1px 0 #5A1220; }
.acct__input[aria-invalid="true"] { border-bottom-color: #8A1C2C; }
.acct__error { min-height: 1.1em; margin: 0; font: 400 0.8rem/1.4 var(--ui); color: #8A1C2C; }
.acct__error:empty { min-height: 0; }
.acct .acct__go { width: 100%; border: 0; cursor: pointer; margin-top: 0.35rem; }
.acct .acct__go:disabled { opacity: 0.7; cursor: progress; }
/* signed in: where to go next, and Sign out */
.acct__links { display: grid; margin: 0.2rem 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(90, 18, 32, 0.2); }
.acct__links a { display: flex; justify-content: space-between; align-items: center; min-height: 50px; border-bottom: 1px solid rgba(90, 18, 32, 0.2);
  font: 400 1.15rem var(--display); color: #3A0A12; text-decoration: none; }
.acct__links a::after { content: "→"; font-family: var(--ui); font-size: 0.95rem; color: #8A5A3A; transition: transform 0.3s var(--ease-out); }
.acct__links a:hover::after { transform: translateX(4px); }
.acct__out { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 0.74rem var(--ui); letter-spacing: 0.18em; text-transform: uppercase; color: #5A1220; text-decoration: underline; text-underline-offset: 0.3em; }
@media (max-width: 700px) {
  .acct[open] { grid-template-columns: 1fr; }
  .acct__art { min-height: 170px; }
  .acct__art svg { width: auto; height: 88%; }
}
/* a signed-in customer: a small gold dot on the account icon */
.masthead__acct { position: relative; }
.masthead__acct.is-signed-in::after { content: ""; position: absolute; top: 0.55rem; right: 0.45rem; width: 7px; height: 7px; border-radius: 50%;
  background: #C9A86A; box-shadow: 0 0 0 2px var(--paper, #E8DCD3); }
/* "Welcome back, Yasmina.": a dark cherry card that slides in under the header just after signing in */
.welcome { position: fixed; z-index: 90; top: calc(var(--masthead-h, 4.6rem) + 0.8rem); left: 50%; display: flex; align-items: center; gap: 0.9rem;
  width: max-content; max-width: calc(100% - 2rem); padding: 0.85rem 0.9rem 0.85rem 1rem; transform: translateX(-50%);
  background: var(--grain), radial-gradient(ellipse at 30% 40%, #4A0D1A, #2A0710); border: 1px solid rgba(201, 168, 106, 0.45);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7); color: #F2E6D2; animation: welcome-in 0.7s var(--ease-out) both; }
.welcome.is-leaving { animation: welcome-out 0.5s ease-in both; }
.welcome__rose { flex: none; width: 2.4rem; height: 2.8rem; }
.welcome__rose svg { width: 100%; height: 100%; }
.welcome__rose path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: circle-draw 2s ease 0.3s forwards; }
.welcome__words { display: grid; gap: 0.2rem; }
.welcome__line { font: italic 400 clamp(1.25rem, 3.4vw, 1.6rem)/1.1 var(--display); color: #F6EEDD; }
.welcome__sub { font: 400 0.8rem/1.3 var(--ui); letter-spacing: 0.04em; color: #D9B262; }
.welcome__close { flex: none; align-self: start; width: 2.2rem; height: 2.2rem; border: 0; background: none; cursor: pointer; font-size: 1.4rem; line-height: 1; color: rgba(242, 230, 210, 0.75); }
.welcome__close:hover { color: #fff; }
@keyframes welcome-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes welcome-out { to { opacity: 0; transform: translate(-50%, -8px); } }
@media (prefers-reduced-motion: reduce) { .welcome, .welcome.is-leaving { animation-duration: 0.01s; } .welcome__rose path { animation: none; stroke-dashoffset: 0; } }
/* /signed-in: the short stop on the way back from Shopify's code page */
.signing { min-height: 100dvh; display: grid; place-items: center; margin: 0; padding: 2rem 1rem;
  background: var(--grain), radial-gradient(ellipse 80% 70% at 50% 35%, #4A0D1A, #2A0710 60%, #14030A); color: #F2E6D2; text-align: center; }
.signing__inner { display: grid; justify-items: center; gap: 1rem; max-width: 26rem; }
.signing__logo { width: 9rem; height: auto; }
.signing__rose { width: 5.5rem; height: 6.4rem; }
.signing__rose path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: circle-draw 2.2s ease forwards; }
.signing__line { margin: 0; font: italic 400 1.6rem/1.2 var(--display); color: #F6EEDD; }
.signing__fine { margin: 0; font: 400 0.9rem/1.5 var(--ui); color: #D9B262; }
.signing__fine a { color: #F2E6D2; }

/* numbered pages under the hijabs (shop and home page): ← Previous  1  2  Next → */
.pager { display: flex; align-items: center; justify-content: center; gap: clamp(0.75rem, 3vw, 2rem); margin: clamp(2.5rem, 6vw, 4rem) 0 1rem; }
.pager[hidden] { display: none; }
.pager__nums { display: flex; gap: 0.4rem; }
.pager__num { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: none; cursor: pointer;
  font: 400 1.2rem/1 var(--display); color: var(--bark); transition: border-color 0.3s, background-color 0.3s, color 0.3s; }
.pager__num:hover { border-color: var(--rule); }
.pager__num[aria-current="page"] { background: var(--cherry); border-color: var(--cherry); color: var(--ivory); }
.pager__step { min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font-size: var(--t-sm); font-weight: 500; letter-spacing: 0.03em; color: var(--bark); }
.pager__step:hover:not(:disabled) { text-decoration: underline; }
.pager__step:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 480px) { .pager { gap: 0.6rem; } .pager__step { font-size: 0.8rem; } }

/* ==========================================================================
   Discount ribbon (assets/js/ui/announcement.js): a slim cherry band above the header while a code is running.
   With it, --header-h grows by the ribbon's height, so every page's spacing moves down with it.
   ========================================================================== */
html.has-ribbon { --ribbon-h: 2.25rem; --header-h: calc(4rem + var(--ribbon-h)); }
@media (min-width: 761px) and (max-width: 1100px) { html.has-ribbon { --header-h: calc(6.25rem + var(--ribbon-h)); } }
html.has-ribbon .masthead { top: var(--ribbon-h); height: calc(var(--header-h) - var(--ribbon-h)); }
.ribbon {
  position: fixed; inset: 0 0 auto; z-index: 51; height: var(--ribbon-h, 2.25rem);
  display: flex; align-items: center; justify-content: center; padding: 0 2.75rem;
  background: var(--cherry); color: var(--ivory);
  font-family: var(--ui); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.ribbon__line { margin: 0; display: flex; align-items: center; gap: 0.55rem; white-space: nowrap; }
.ribbon__lead { font-weight: 500; }
.ribbon__dot { opacity: 0.55; }
.ribbon__code {
  padding: 0.15rem 0.6rem; border: 1px dashed rgba(240, 236, 225, 0.7); border-radius: 2px; background: transparent;
  color: inherit; font: inherit; font-weight: 500; letter-spacing: 0.22em; cursor: pointer; transition: background-color 0.25s, color 0.25s;
}
.ribbon__code:hover, .ribbon__code.is-copied { background: var(--ivory); color: var(--cherry); }
.ribbon__code:focus-visible, .ribbon__close:focus-visible { outline: 1.5px solid var(--ivory); outline-offset: 2px; }
.ribbon__copied { position: absolute; right: 2.9rem; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: none; opacity: 0.85; }
.ribbon__close {
  position: absolute; right: 0.6rem; top: 50%; translate: 0 -50%; width: 1.9rem; height: 1.9rem;
  border: 0; background: none; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; opacity: 0.75;
}
.ribbon__close:hover { opacity: 1; }
@media (max-width: 620px) {
  .ribbon { font-size: 0.68rem; letter-spacing: 0.08em; padding: 0 2.4rem 0 0.75rem; }
  .ribbon__until, .ribbon__until-dot { display: none; }
  .ribbon__copied { display: none; }
}
@media (max-width: 480px) { .ribbon__lead, .ribbon__lead + .ribbon__dot { display: none; } }
