/* ===========================================================================
   AV Fragrance Book — "The Fragrance Library"
   Leather-bound book view over WooCommerce. Reconciles the spec's luxury tokens
   with the live av-storefront palette (umber/gold/porcelain). Loaded only on
   book surfaces. Progressive enhancement: the grid fallback is real + visible
   until JS flips to .avfb-ready.
   =========================================================================== */
.avfb-archive {
  /* Design system — "pure black table / black book / cream paper" (luxury palette) */
  --avfb-walnut:      #0E0E0E;  /* table / page background (deep black) */
  --avfb-walnut-dark: #0A0A0A;  /* vignette edges (darker black) */
  --avfb-leather:     #0E0E0E;  /* book cover, binding, dark buttons (black) */
  --avfb-onyx:        #0E0E0E;  /* search bar, cart drawer, dropdowns (black) */
  --avfb-paper:       #F5EFE3;  /* book pages (luxury cream) */
  --avfb-paper-shade: #F0EBE3;  /* gutter, card fills on paper (slightly darker cream) */
  --avfb-gold:        #C9A24B;  /* refined gold — text/buttons ON DARK only */
  --avfb-champagne:   #C9A24B;  /* hover/highlights on dark (refined gold) */
  --avfb-brass:       #C9A24B;  /* thin borders, dividers, page edges (refined gold) */
  --avfb-gold-ink:    #C9A24B;  /* gold-colored TEXT ON PAPER (refined gold) */
  --avfb-ink:         #0E0E0E;  /* body text on paper (black) */
  --avfb-ink-soft:    #888888;  /* secondary text on paper (neutral gray) */
  --avfb-ivory:       #F5EFE3;  /* text on dark (cream) */
  --avfb-oud:         #C9A24B;  /* sale badge / oud accent (refined gold) */
  /* refined accord palette (gold gradient) */
  --avfb-accord-1:#B8933D; --avfb-accord-2:#C9A24B; --avfb-accord-3:#D9B862;
  --avfb-accord-4:#E5C878; --avfb-accord-5:#EADA8F;
  /* back-compat aliases used lower in this file */
  --avfb-page: var(--avfb-paper);
  --avfb-page-2: var(--avfb-paper-shade);
  --avfb-gold-lt: var(--avfb-champagne);
  --avfb-edge: var(--avfb-brass);
  --avfb-muted: var(--avfb-ink-soft);
  --avfb-ease: cubic-bezier(.645,.045,.355,1);
  position: relative;
  margin: 0 0 2rem;
}

/* ---- Toolbar: view toggle + page indicator ---- */
.avfb-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0 0 1rem; flex-wrap: wrap;
}
.avfb-viewtoggle { display: inline-flex; border: 1px solid var(--av-line, rgba(23,20,17,.12)); border-radius: 999px; overflow: hidden; background: #fff; }
.avfb-vt {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--av-font-body, system-ui); font-weight: 600; font-size: .85rem;
  padding: .55em 1.1em; color: var(--av-ink-dark, #211c15); min-height: 40px;
  transition: background .2s var(--avfb-ease), color .2s var(--avfb-ease);
}
.avfb-vt:not(.is-active):hover { color: var(--av-gold, #C9A24B); }
.avfb-vt.is-active { background: var(--av-gold, #C9A24B); color: #1a1a1a; }
.avfb-vt:focus-visible { outline: 2px solid var(--avfb-gold); outline-offset: 2px; }
.avfb-pageind { font-family: var(--av-font-body, system-ui); font-size: .82rem; color: var(--av-ink, #F5EFE3); opacity: .72; }

/* ===========================================================================
   DEFAULT (no JS / grid view): show the grid, hide the book stage.
   .avfb-ready (added by JS) flips this for book view.
   =========================================================================== */
.avfb-stage { display: none; }
.avfb-grid { display: block; }
.avfb-archive.avfb-ready[data-view="book"] .avfb-stage { display: block; }
.avfb-archive.avfb-ready[data-view="book"] .avfb-grid { display: none; }
.avfb-archive.avfb-ready[data-view="grid"] .avfb-stage { display: none; }
.avfb-archive.avfb-ready[data-view="grid"] .avfb-grid { display: block; }

/* ---- The book stage = a dark WALNUT TABLE with wood grain + vignette ---- */
.avfb-stage {
  position: relative;
  background:
    radial-gradient(120% 100% at 50% 40%, transparent 40%, rgba(0,0,0,.45) 100%),  /* vignette */
    repeating-linear-gradient(94deg, rgba(0,0,0,.14) 0 2px, transparent 2px 7px),   /* fine grain */
    repeating-linear-gradient(90deg, rgba(255,255,255,.015) 0 40px, transparent 40px 90px),
    linear-gradient(160deg, var(--avfb-walnut) 0%, var(--avfb-walnut-dark) 100%);
  border-radius: 16px;
  padding: clamp(1.2rem, 4vw, 3rem);
  box-shadow: inset 0 1px 0 rgba(201,169,94,.08), 0 30px 80px -30px rgba(0,0,0,.75);
}
/* the book sits on the table with a soft contact shadow */
.avfb-book { margin: 0 auto; position: relative; }
.avfb-book::before {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -14px; height: 34px; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.6), transparent 72%); filter: blur(6px);
}

/* ---- Cream paper pages with a center-gutter shadow ---- */
.avfb-page {
  background: var(--avfb-paper, #F5EFE3);
  color: var(--avfb-ink); box-sizing: border-box; overflow: hidden;
  box-shadow: inset 0 0 60px rgba(138,106,47,.07);
}
/* page-thickness edge lines on the OUTER edge + gutter shadow on the BINDING edge */
.avfb-page::after { content: ""; position: absolute; top: 0; bottom: 0; width: 44px; pointer-events: none; }
.avfb-stage[data-rtl="1"] .avfb-page::after { right: 0; background: linear-gradient(to left, rgba(60,40,20,.22), transparent); }
.avfb-stage[data-rtl="0"] .avfb-page::after { left: 0; background: linear-gradient(to right, rgba(60,40,20,.22), transparent); }
/* faint paper grain */
.avfb-page::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ---- Cover page ---- */
.avfb-page--cover {
  background: linear-gradient(160deg, #0E0E0E 0%, #0A0A0A 100%);
  color: var(--avfb-champagne);
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px solid rgba(201,169,94,.3);
}
.avfb-cover__inner { padding: clamp(1.4rem, 4vw, 3rem); display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.avfb-cover__seal { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--avfb-gold-lt); position: relative; margin-bottom: .6rem; }
.avfb-cover__seal::after { content: "AV"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--av-font-display, serif); font-weight: 700; color: var(--avfb-gold-lt); font-size: 1rem; }
.avfb-cover__kicker { font-family: var(--av-font-display, serif); letter-spacing: .28em; text-transform: uppercase; font-size: .72rem; color: var(--avfb-gold-lt); }
.avfb-cover__title { font-family: var(--av-font-display, serif); font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin: .3rem 0; color: #fff; line-height: 1.15; }
.av-lang-ar .avfb-cover__title { font-family: var(--av-font-ar-display, serif); }
.avfb-cover__line { color: var(--avfb-champagne); opacity: .9; margin: 0; font-size: 1rem; }
.avfb-cover__count { color: var(--avfb-gold-lt); font-weight: 600; font-size: .9rem; margin-top: .4rem; }
.avfb-cover__hint { font-size: .78rem; color: rgba(230,211,163,.6); margin-top: 1rem; }

/* ---- Product page / spread ---- */
.avfb-page--product { padding: clamp(1rem, 2.4vw, 1.8rem); }
.avfb-spread { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2rem); height: 100%; align-items: center; }
.avfb-stage[data-rtl="1"] .avfb-spread { direction: rtl; }
.avfb-spread__visual {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(70% 60% at 50% 45%, rgba(255,255,255,.5), transparent 70%);
  border-radius: 12px; padding: 1rem; height: 100%;
}
.avfb-shot { max-width: 100%; max-height: 42vh; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; filter: drop-shadow(0 20px 30px rgba(0,0,0,.28)); }
.avfb-shot__link { display: flex; align-items: center; justify-content: center; }
.avfb-spread__info { display: flex; flex-direction: column; gap: .5rem; }
.avfb-brand { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--avfb-gold); }
.avfb-name { font-family: var(--av-font-display, serif); font-size: clamp(1.3rem, 2.4vw, 1.9rem); margin: 0; line-height: 1.2; color: var(--avfb-ink); }
.av-lang-ar .avfb-name { font-family: var(--av-font-ar-display, serif); }
.avfb-name a { color: inherit; text-decoration: none; }
.avfb-name a:hover { color: var(--avfb-gold); }

/* notes pyramid */
.avfb-pyramid { display: flex; flex-direction: column; gap: .35rem; margin: .3rem 0; }
.avfb-pyramid__row { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.avfb-pyramid__label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--avfb-muted); min-width: 3.4em; }
.avfb-pyramid__notes { display: flex; flex-wrap: wrap; gap: .3rem; }
.avfb-note { font-size: .78rem; padding: .18em .6em; border: 1px solid rgba(138,106,47,.35); border-radius: 999px; color: var(--avfb-ink); background: rgba(201,169,94,.08); }

/* size tiles (dropdown-free) */
.avfb-sizes { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.avfb-size {
  min-width: 3.2rem; min-height: 40px; padding: .4em .9em; cursor: pointer;
  border: 1.5px solid rgba(138,106,47,.4); border-radius: 8px; background: rgba(255,255,255,.4);
  font-family: var(--av-font-body, system-ui); font-weight: 600; font-size: .85rem; color: var(--avfb-ink);
  transition: background .18s var(--avfb-ease), border-color .18s var(--avfb-ease), color .18s var(--avfb-ease);
}
.avfb-size:hover { border-color: var(--avfb-gold); }
.avfb-size.is-selected { background: var(--av-brand, #0E0E0E); color: #fff; border-color: var(--av-brand, #0E0E0E); box-shadow: 0 0 0 2px rgba(156,122,46,.5); }
.avfb-size:focus-visible { outline: 2px solid var(--avfb-gold); outline-offset: 2px; }

/* price */
.avfb-price { font-family: var(--av-font-body, system-ui); font-weight: 800; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--avfb-ink); direction: ltr; }
.avfb-price del { color: var(--avfb-muted); font-weight: 500; font-size: .72em; }
.avfb-price ins { text-decoration: none; color: var(--avfb-gold); }

/* actions */
.avfb-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .3rem; position: relative; z-index: 10; }
.avfb-atc {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 46px; padding: .6em 1.5em; cursor: pointer;
  background: linear-gradient(135deg, var(--avfb-gold-lt), var(--avfb-gold)); color: #1a140a;
  border: 0; border-radius: 999px; font-family: var(--av-font-body, system-ui); font-weight: 700; font-size: .92rem;
  box-shadow: 0 8px 22px -10px rgba(156,122,46,.7);
  transition: transform .2s var(--avfb-ease), box-shadow .3s var(--avfb-ease), filter .2s var(--avfb-ease);
}
.avfb-atc:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 14px 30px -10px rgba(156,122,46,.85); }
.avfb-atc:active:not(:disabled) { transform: translateY(0); }
.avfb-atc:disabled, .avfb-atc--oos { background: #D9D9D9; color: #555555; box-shadow: none; cursor: not-allowed; }
.avfb-atc:focus-visible { outline: 2px solid var(--avfb-edge); outline-offset: 3px; }
.avfb-atc.is-loading { pointer-events: none; opacity: .7; }
.avfb-atc.is-added { background: var(--av-brand, #0E0E0E); color: #fff; }
.avfb-details { color: var(--avfb-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; font-size: .85rem; }
.avfb-details:hover { color: var(--avfb-gold); }
.avfb-ship { margin: .4rem 0 0; font-size: .78rem; color: var(--avfb-muted); font-weight: 600; }

/* ---- Navigation arrows ---- */
.avfb-nav { position: absolute; inset: 0; pointer-events: none; }
.avfb-prev, .avfb-next {
  position: absolute; top: 50%; transform: translateY(-50%); pointer-events: auto;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: rgba(21,18,14,.75); color: var(--avfb-champagne); border: 1px solid rgba(201,169,94,.35);
  font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--avfb-ease), transform .2s var(--avfb-ease);
}
.avfb-prev:hover, .avfb-next:hover { background: var(--avfb-gold); color: #1a140a; }
.avfb-prev:focus-visible, .avfb-next:focus-visible { outline: 2px solid var(--avfb-gold-lt); outline-offset: 2px; }
.avfb-prev { left: -6px; } .avfb-next { right: -6px; }
.avfb-stage[data-rtl="1"] .avfb-prev { left: auto; right: -6px; }
.avfb-stage[data-rtl="1"] .avfb-next { right: auto; left: -6px; }

/* ---- Grid fallback ---- */
.avfb-grid ul.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(.8rem, 2vw, 1.3rem); list-style: none; margin: 0; padding: 0; }
.avfb-grid li.product { background: #fff; border: 1px solid var(--av-line, rgba(23,20,17,.12)); border-radius: 18px; padding: .8rem; }
.avfb-product--grid .avfb-spread { display: flex; flex-direction: column; gap: .5rem; height: auto; }
.avfb-product--grid .avfb-spread__visual { background: #fff; border-radius: 12px; aspect-ratio: 4/5; }
.avfb-product--grid .avfb-shot { max-height: none; aspect-ratio: 4/5; }
.avfb-product--grid .avfb-pyramid { display: none; }

/* ---- fly-to-cart bottle clone (transform + opacity only; no layout props) ---- */
.avfb-fly { position: fixed; z-index: 900; pointer-events: none; border-radius: 8px; object-fit: contain;
  transition: transform .8s cubic-bezier(.22,1,.36,1), opacity .8s cubic-bezier(.22,1,.36,1); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .avfb-spread { grid-template-columns: 1fr; gap: .8rem; }
  .avfb-spread__visual { max-height: 38vh; }
  .avfb-shot { max-height: 34vh; }
  .avfb-prev, .avfb-next { width: 40px; height: 40px; }
  .avfb-grid ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .avfb-atc, .avfb-size, .avfb-vt { transition: none; }
}

/* ===========================================================================
   THE LIBRARY SHELF — [av_fragrance_shelf]. A row of closed leather volumes
   (Men / Women / Unisex / Body Splash) that open into each category's book.
   Lives on the homepage; dark stage to match the cinematic home.
   =========================================================================== */
.avfb-shelf {
  --sh-onyx:#0E0E0E; --sh-leather:#0E0E0E; --sh-leather-2:#0E0E0E;
  --sh-gold:#C9A95E; --sh-gold-dp:#9C7A2E; --sh-ink:#F4EFE5;
  position: relative; padding: clamp(1.4rem,4vw,3rem) 0 2.4rem;
}
.avfb-shelf__head { text-align: center; margin-bottom: clamp(1.4rem,3vw,2.4rem); }
.avfb-shelf__title { font-family: var(--av-font-display, serif); font-size: clamp(1.6rem,3.4vw,2.6rem); color: var(--sh-ink); margin: 0 0 .4rem; }
.av-lang-ar .avfb-shelf__title { font-family: var(--av-font-ar-display, serif); }
.avfb-shelf__sub { color: #888888; margin: 0; font-size: clamp(.95rem,1.4vw,1.05rem); }

.avfb-shelf__row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(1rem, 3vw, 2.2rem); align-items: end;
  max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem,4vw,2rem);
}
/* the shelf board the books stand on */
.avfb-shelf__board {
  display: block; max-width: 1180px; height: 14px; margin: -7px auto 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #0E0E0E, #0A0A0A);
  box-shadow: 0 18px 30px -16px rgba(0,0,0,.7), inset 0 1px 0 rgba(201,169,94,.25);
}

/* each volume = a standing closed book */
.avfb-vol { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: .7rem;
  transition: transform .4s cubic-bezier(.22,1,.36,1); }
.avfb-vol:hover { transform: translateY(-10px); }
.avfb-vol__book {
  position: relative; width: 100%; max-width: 210px; aspect-ratio: 3/4; margin: 0 auto;
  border-radius: 6px 10px 10px 6px; overflow: hidden;
  background: linear-gradient(100deg, var(--sh-leather) 0%, var(--sh-leather-2) 12%, var(--sh-leather) 20%, var(--sh-leather-2) 100%);
  box-shadow: 0 24px 44px -18px rgba(0,0,0,.8), inset 0 0 0 1px rgba(201,169,94,.22), inset -8px 0 18px rgba(0,0,0,.45);
  transition: box-shadow .4s ease;
}
.avfb-vol:hover .avfb-vol__book { box-shadow: 0 34px 60px -18px rgba(0,0,0,.9), inset 0 0 0 1px rgba(201,169,94,.5); }
/* the raised spine band near the binding */
.avfb-vol__spineband { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 14px; background: linear-gradient(90deg, rgba(0,0,0,.4), transparent); }
/* cover art = a product photo, softly embossed into the leather */
.avfb-vol__art { position: absolute; inset: 14% 12% 34%; background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: .9; mix-blend-mode: screen; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
/* gold gilt frame */
.avfb-vol__gild { position: absolute; inset: 8px; border: 1px solid rgba(201,169,94,.4); border-radius: 4px 7px 7px 4px; pointer-events: none; }
.avfb-vol__plate { position: absolute; left: 0; right: 0; bottom: 8%; display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; padding: 0 .6rem; }
.avfb-vol__seal { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--sh-gold); color: var(--sh-gold); display: flex; align-items: center; justify-content: center; font-family: var(--av-font-display, serif); font-weight: 700; font-size: .72rem; margin-bottom: .2rem; }
.avfb-vol__title { font-family: var(--av-font-ar-display, serif); font-size: clamp(1.05rem,1.8vw,1.3rem); font-weight: 700; color: #fff; line-height: 1.15; }
.av-lang-en .avfb-vol__title { font-family: var(--av-font-display, serif); }
.avfb-vol__count { font-size: .72rem; color: var(--sh-gold); letter-spacing: .02em; }
.avfb-vol__line { color: #888888; font-size: .85rem; text-align: center; max-width: 24ch; }
.avfb-vol__open { color: var(--sh-gold); font-weight: 600; font-size: .82rem; display: inline-flex; gap: .3em; opacity: 0; transform: translateY(-4px); transition: opacity .3s ease, transform .3s ease; }
.avfb-vol:hover .avfb-vol__open, .avfb-vol:focus-visible .avfb-vol__open { opacity: 1; transform: none; }
.avfb-vol:focus-visible { outline: none; }
.avfb-vol:focus-visible .avfb-vol__book { box-shadow: 0 0 0 3px var(--sh-gold), 0 24px 44px -18px rgba(0,0,0,.8); }
html[dir="rtl"] .avfb-vol__open span { scale: -1 1; display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .avfb-vol, .avfb-vol__book, .avfb-vol__open { transition: none; }
}
@media (max-width: 560px) {
  .avfb-shelf__row { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  .avfb-vol__open { opacity: 1; transform: none; } /* touch: always show the hint */
}

/* unavailable size tiles — clearly non-interactive (more than color: strike) */
.avfb-size.is-unavailable { opacity: .4; cursor: not-allowed; position: relative; }
.avfb-size.is-unavailable::after { content: ""; position: absolute; inset-inline: 14%; top: 50%; height: 1.5px; background: currentColor; transform: rotate(-10deg); opacity: .7; }
.avfb-size.is-unavailable:hover { border-color: rgba(138,106,47,.4); }
/* nudge animation when a variable product needs a size */
.avfb-sizes--nudge { animation: avfb-nudge .5s ease; }
@keyframes avfb-nudge { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* ===========================================================================
   v0.5 — PRODUCT SPREAD (spec §4): left page = buy, right page = explore.
   Each perfume = two .avfb-page--buy / .avfb-page--explore (StPageFlip pairs them).
   =========================================================================== */
.avfb-page--buy .avfb-pg, .avfb-page--explore .avfb-pg {
  position: relative; height: 100%; box-sizing: border-box;
  padding: clamp(1.3rem, 3vw, 2.4rem) clamp(1.2rem, 3vw, 2.2rem) clamp(2rem, 4vw, 2.8rem);
  display: flex; flex-direction: column; gap: .55rem;
}
/* wishlist + sale badge in the top outer corner */
.avfb-wish { position: absolute; top: 1rem; inset-inline-end: 1rem; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--avfb-brass);
  background: transparent; color: var(--avfb-gold-ink); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--avfb-ease), color .2s var(--avfb-ease); }
.avfb-wish:hover { background: rgba(122,92,36,.1); }
.avfb-wish:focus-visible { outline: 2px solid var(--avfb-gold-ink); outline-offset: 2px; }
.avfb-sale { position: absolute; top: 1.1rem; inset-inline-start: 1rem; z-index: 3;
  background: var(--avfb-oud); color: #fff; font-weight: 700; font-size: .72rem; padding: .25em .6em; border-radius: 999px; direction: ltr; }

/* brand / name / type / desc */
.avfb-page--buy .avfb-brand { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--avfb-gold-ink); }
.avfb-page--buy .avfb-name { font-family: var(--av-font-display, "Cormorant Garamond", serif); font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.12; margin: 0; color: var(--avfb-ink); font-weight: 700; }
.av-lang-ar .avfb-page--buy .avfb-name { font-family: var(--av-font-ar-display, serif); }
.avfb-page--buy .avfb-name a { color: inherit; text-decoration: none; }
.avfb-page--buy .avfb-name a:hover { color: var(--avfb-gold-ink); }
.avfb-desc { font-style: italic; color: var(--avfb-ink-soft); font-size: .92rem; margin: 0; line-height: 1.5; }
/* Enrichment data: rating + perfumer */
.avfb-enrichment { margin: 0.6rem 0 0; padding: 0.6rem 0; border-top: 1px solid rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 0.4rem; }
.avfb-rating { display: flex; align-items: center; gap: 0.4rem; font-size: .9rem; color: var(--avfb-ink); }
.avfb-stars { font-size: 1rem; color: var(--avfb-gold); font-weight: 600; letter-spacing: 0.05em; }
.avfb-rating-value { font-weight: 500; }
.avfb-votes { color: var(--avfb-ink-soft); font-size: .85rem; }
.avfb-perfumer { display: flex; align-items: center; gap: 0.3rem; font-size: .9rem; color: var(--avfb-ink); }
.avfb-perfumer-label { font-weight: 500; color: var(--avfb-ink-soft); }
.avfb-perfumer-name { font-weight: 600; }
/* Grid card enrichment (compact) */
.avfb-enrichment-compact { margin: 0.6rem 0 0.5rem 0; font-size: 0.85rem; display: block; width: 100%; }
.avfb-rating-compact { display: flex; align-items: center; gap: 0.3rem; color: var(--avfb-ink); font-size: 0.85rem; margin-bottom: 0.2rem; }
.avfb-rating-compact .avfb-stars { color: var(--avfb-gold); font-weight: 600; font-size: 1rem; }
.avfb-perfumer-compact { display: flex; gap: 0.3rem; color: var(--avfb-ink); font-size: 0.8rem; margin-top: 0.2rem; }
.avfb-perfumer-compact .avfb-perfumer-label { color: var(--avfb-ink-soft); font-weight: 500; }

/* buy grid: bottle on the OUTER edge + size/price on the inner side */
.avfb-buygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; margin: .2rem 0; flex: 1; }
.avfb-page--buy .avfb-shot__link { display: flex; align-items: center; justify-content: center; }
.avfb-page--buy .avfb-shot { max-width: 100%; max-height: 34vh; width: auto; object-fit: contain; filter: drop-shadow(0 18px 26px rgba(40,25,12,.35)); }
.avfb-buygrid__side { display: flex; flex-direction: column; gap: .7rem; }

/* size pills WITH price under each (spec §4.1.8) */
.avfb-sizes { display: flex; flex-wrap: wrap; gap: .45rem; }
.avfb-size { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 3.4rem; min-height: 44px;
  padding: .4em .7em; cursor: pointer; border: 1.5px solid var(--avfb-brass); border-radius: 10px;
  background: rgba(255,255,255,.35); color: var(--avfb-ink); font-family: var(--av-font-body, system-ui);
  transition: background .18s var(--avfb-ease), border-color .18s var(--avfb-ease), color .18s var(--avfb-ease); }
.avfb-size__v { font-weight: 700; font-size: .9rem; }
.avfb-size__p { font-size: .72rem; color: var(--avfb-ink-soft); }
.avfb-size:hover:not(.is-unavailable) { border-color: var(--avfb-gold-ink); }
.avfb-size.is-selected { background: var(--avfb-leather); border-color: var(--avfb-leather); color: var(--avfb-gold); }
.avfb-size.is-selected .avfb-size__p { color: var(--avfb-champagne); }
.avfb-size:focus-visible { outline: 2px solid var(--avfb-gold-ink); outline-offset: 2px; }
.avfb-size.is-unavailable { opacity: .4; cursor: not-allowed; position: relative; }
.avfb-size.is-unavailable::after { content: ""; position: absolute; inset-inline: 14%; top: 50%; height: 1.5px; background: currentColor; transform: rotate(-10deg); opacity: .7; }

.avfb-price { font-family: var(--av-font-body, system-ui); font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 1.65rem); color: var(--avfb-ink); direction: ltr; }
.avfb-price del { color: var(--avfb-ink-soft); font-weight: 500; font-size: .68em; }
.avfb-price ins { text-decoration: none; color: var(--avfb-gold-ink); }

/* actions row: qty + add + details (spec §4.1.10) */
.avfb-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.avfb-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--avfb-brass); border-radius: 999px; overflow: hidden; }
.avfb-qty__btn { width: 34px; height: 44px; border: 0; background: transparent; color: var(--avfb-ink); font-size: 1.2rem; cursor: pointer; }
.avfb-qty__btn:hover { background: rgba(122,92,36,.1); }
.avfb-qty__n { min-width: 1.6rem; text-align: center; font-weight: 700; }
/* primary ATC — leather fill, gold text (on-paper primary per spec §2.4) */
.avfb-page--buy .avfb-atc, .avfb-product--grid .avfb-atc {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; flex: 1; min-width: 9rem;
  min-height: 52px; padding: .6em 1.4em; cursor: pointer; border: 0; border-radius: 999px;
  background: var(--avfb-leather); color: var(--avfb-gold); font-family: var(--av-font-body, system-ui);
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .86rem;
  transition: transform .2s var(--avfb-ease), box-shadow .3s var(--avfb-ease), filter .2s var(--avfb-ease); }
.avfb-page--buy .avfb-atc:hover:not(:disabled), .avfb-product--grid .avfb-atc:hover:not(:disabled) {
  transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--avfb-gold), 0 10px 24px -12px rgba(0,0,0,.6); filter: brightness(1.06); }
.avfb-atc:disabled, .avfb-atc--oos { opacity: .4; cursor: not-allowed; }
.avfb-atc.is-loading { opacity: .7; pointer-events: none; }
.avfb-atc.is-added { background: var(--avfb-success, #3F6B4A); color: #fff; }
.avfb-atc:focus-visible { outline: 2px solid var(--avfb-gold-ink); outline-offset: 2px; }
/* secondary "More Details" — outline, next to ATC */
.avfb-details.button { display: inline-flex; align-items: center; min-height: 52px; padding: .6em 1.2em;
  background: transparent; border: 1.5px solid var(--avfb-brass); color: var(--avfb-ink); border-radius: 999px;
  font-weight: 600; font-size: .82rem; text-decoration: none; transition: border-color .2s var(--avfb-ease), background .2s var(--avfb-ease); }
.avfb-details.button:hover { border-color: var(--avfb-gold-ink); background: rgba(122,92,36,.06); color: var(--avfb-ink); }

.avfb-ship { display: inline-flex; align-items: center; gap: .4em; margin: .2rem 0 0; font-size: .78rem; color: var(--avfb-ink-soft); font-weight: 600; }
.avfb-ship__i { color: var(--avfb-gold-ink); display: inline-flex; }
.avfb-pgnum { position: absolute; bottom: .7rem; left: 0; right: 0; text-align: center; font-family: var(--av-font-display, serif); color: var(--avfb-gold-ink); font-size: .9rem; }

/* ---- RIGHT PAGE: explore ---- */
.avfb-xtitle { font-family: var(--av-font-display, serif); font-size: clamp(1.2rem, 2.2vw, 1.6rem); color: var(--avfb-ink); margin: 0 0 .3rem; }
.av-lang-ar .avfb-xtitle { font-family: var(--av-font-ar-display, serif); }
.avfb-xh { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--avfb-gold-ink); margin: .2rem 0 .5rem; }
.avfb-xempty { color: var(--avfb-ink-soft); font-style: italic; }

/* rating */
.avfb-rating { display: flex; align-items: center; gap: .5rem; }
.avfb-stars { position: relative; font-size: 1.1rem; color: var(--avfb-brass); letter-spacing: .1em; }
.avfb-stars::before { content: "★★★★★"; position: absolute; inset: 0; width: var(--pct,0); overflow: hidden; color: var(--avfb-gold-ink); white-space: nowrap; }
.avfb-rating__t { font-size: .85rem; color: var(--avfb-ink-soft); }

/* accord bars — warm palette, darkest = strongest, width = strength */
.avfb-accords { display: flex; flex-direction: column; gap: .4rem; }
.avfb-accord { position: relative; height: 26px; width: var(--w, 100%); border-radius: 6px; display: flex; align-items: center; padding-inline: .7em; min-width: 40%; }
.avfb-accord__l { font-size: .8rem; font-weight: 600; color: #fff; }
.avfb-accord--1 { background: var(--avfb-accord-1); }
.avfb-accord--2 { background: var(--avfb-accord-2); }
.avfb-accord--3 { background: var(--avfb-accord-3); }
.avfb-accord--4 { background: var(--avfb-accord-4); }
.avfb-accord--4 .avfb-accord__l, .avfb-accord--5 .avfb-accord__l { color: var(--avfb-ink); }
.avfb-accord--5 { background: var(--avfb-accord-5); }

/* real Fragrantica accords: true strength width + authentic accord colour + auto-contrast label */
.avfb-accords--real { gap: .45rem; }
.avfb-accords--real .avfb-accord {
  height: 30px; min-width: 4.5rem; border-radius: 7px; justify-content: space-between; gap: .5rem;
  background: var(--bg, var(--avfb-brass)); color: var(--ink, #fff);
  box-shadow: inset 0 0 0 1px rgba(14,14,14,.10), 0 1px 2px rgba(14,14,14,.14);
  overflow: hidden; animation: avfb-accord-grow .7s var(--avfb-ease) both;
}
.avfb-accords--real .avfb-accord::after { /* soft top sheen for depth on any colour */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 50%;
  background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,0)); pointer-events: none;
}
.avfb-accords--real .avfb-accord__l { position: relative; z-index: 1; color: inherit; white-space: nowrap; }
.avfb-accord__pct { position: relative; z-index: 1; font-size: .68rem; font-weight: 700; letter-spacing: .02em; opacity: .82; color: inherit; font-variant-numeric: tabular-nums; }
@keyframes avfb-accord-grow { from { width: 0; } to { width: var(--w, 100%); } }
@media (prefers-reduced-motion: reduce) { .avfb-accords--real .avfb-accord { animation: none; } }

/* notes pyramid */
.avfb-pyr { display: flex; flex-direction: column; gap: .5rem; }
.avfb-pyr__row { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.avfb-pyr__tier { min-width: 3.6em; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--avfb-gold-ink); }
.avfb-pyr__notes { display: flex; flex-wrap: wrap; gap: .3rem; }
.avfb-note { display: inline-flex; align-items: center; gap: .35em; font-size: .78rem; padding: .18em .6em; border: 1px solid var(--avfb-brass); border-radius: 999px; color: var(--avfb-ink); background: rgba(201,162,75,.1); }
/* real pyramid: note chips carry the Fragrantica note thumbnail */
.avfb-pyr--real .avfb-pyr__row { align-items: center; }
.avfb-note--img { padding-inline-start: .28em; }
.avfb-note__thumb {
  width: 20px; height: 20px; border-radius: 999px; flex: 0 0 auto;
  background: var(--avfb-paper-shade) center/cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(14,14,14,.12);
}

/* Flip-vs-click: make the control itself the event target (not an inner <span>),
   so StPageFlip's own a/button pass-through recognises it and the JS guard's
   closest() checks are exact. Pairs with the capture-phase guard in the JS. */
.avfb-stage a *, .avfb-stage button * { pointer-events: none; }

/* in landscape StPageFlip gives each .avfb-page its own sheet; ensure full height */
.avfb-page--buy, .avfb-page--explore { background: var(--avfb-paper, #F5EFE3); }

/* mobile: single page, bottle above the buy controls */
@media (max-width: 768px) {
  .avfb-buygrid { grid-template-columns: 1fr; }
  .avfb-page--buy .avfb-shot { max-height: 30vh; }
  .avfb-actions { gap: .4rem; }
  .avfb-page--buy .avfb-atc { min-width: 7rem; }
}

/* ===========================================================================
   AUDIT PASS (v0.9) — contrast, grid cards, right-page heading, overflow guards
   (brief Priorities 1, 2, 3, 5)
   =========================================================================== */
/* Grid product names were cream-on-porcelain (≈1.15:1, invisible). Umber ink. */
.avfb-grid .avfb-name,
.avfb-grid .avfb-name a { color: var(--av-ink-dark, #211c15); }
.avfb-grid .avfb-name a:hover { color: var(--av-gold, #C9A24B); }

/* Bottle floats on the porcelain card — drop the dark object-fit letterbox frame
   so the studio-white blends into the card (matches the homepage treatment). */
.avfb-grid .avfb-shot { background: transparent !important; }

/* Card fills its grid cell; 240px rhythm with 24px gutters (brief P3/P5). */
.avfb-grid li.product > .avfb-product--grid { width: 100%; }
.avfb-grid ul.products {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
@media (max-width: 600px) {
  .avfb-grid ul.products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* Right (explore) page top heading was cream-on-cream paper — umber ink. */
.avfb-page--explore .avfb-xtitle { color: var(--av-ink-dark, #211c15); }

/* Book overflow guard (brief P2): a long title clamps to THREE lines (enough
   to show full names like "… Carolina Herrera for women") instead of pushing
   the add-to-cart / notes off the fixed book page. The taller page ratio in
   av-fragrance-book.js gives the extra room; overflow:hidden is the last resort
   for the rare title longer still. */
.avfb-page--buy .avfb-name {
  overflow: visible; word-break: break-word; text-wrap: balance;
  font-size: clamp(1.15rem, 2.3vw, 1.7rem); line-height: 1.16;
}
.avfb-page--buy .avfb-actions { flex-shrink: 0; }

/* ---------------------------------------------------------------------------
   MOBILE BOOK (single-page / portrait, brief P7): the buy page must fit name +
   rating + image + sizes + price + add-to-cart in ONE fixed portrait page. The
   image was 30vh — on tall phones that ballooned and pushed the name (top) and
   the add-to-cart (bottom) off the page. Cap it in px, drop the long blurb,
   tighten the rhythm, and clamp the title to 2 lines here.
   (These rules are last in the file so they win over the 768px block above.)
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .avfb-page--buy .avfb-pg { padding: 1rem 1.1rem 1.25rem; gap: .35rem; }
  .avfb-page--buy .avfb-name {
    font-size: clamp(1.1rem, 4.2vw, 1.45rem);
  }
  .avfb-page--buy .avfb-desc { display: none; }        /* save vertical room */
  .avfb-page--buy .avfb-shot { max-height: 180px; }    /* px cap, not vh */
  .avfb-buygrid { gap: .5rem; margin: .1rem 0; }
  .avfb-page--buy .avfb-enrichment { margin-top: .3rem; padding: .3rem 0; }
  .avfb-page--buy .avfb-ship { margin: .2rem 0 0; }
}

/* ===========================================================================
   POLISH PASS (v0.9.5) — grid cards adopt the book's porcelain paper.
   The hero book page, the archive book spreads, and the single-product buy
   page all present each bottle on warm porcelain (--avfb-paper #F5EFE3). The
   grid card was the one surface still on clinical #fff — the lone "default
   e-commerce" tell on an otherwise cinematic dark storefront. Unify it:
     • card body  -> porcelain paper (one material across the whole system)
     • photo well -> explicit white rounded mat (the bottle PNGs are opaque
                     studio-white, so they stay seamless and read as a framed
                     product photo on paper, NOT a nested card)
     • edge       -> faint gold hairline, warm shadow, a quiet lift on hover
   (brief P10 — no stark white blocks; gold/porcelain/espresso only.)
   =========================================================================== */
.avfb-grid li.product {
  background: var(--avfb-paper, #F5EFE3);
  border: 1px solid rgba(201,162,75,.22);
  border-radius: 18px;
  padding: .75rem .8rem 1rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset,
              0 12px 30px -16px rgba(14,11,8,.60);
  transition: transform .5s cubic-bezier(.22,1,.36,1),
              box-shadow .5s cubic-bezier(.22,1,.36,1),
              border-color .4s ease;
}
.avfb-grid li.product:hover {
  transform: translateY(-4px);
  border-color: rgba(201,162,75,.52);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset,
              0 22px 46px -18px rgba(14,11,8,.74);
}
/* The bottle images are opaque white PNGs — give them an explicit white rounded
   mat so they sit cleanly on the porcelain instead of printing a raw rectangle. */
.avfb-grid .avfb-shot__link {
  display: block; background: #fff; border-radius: 13px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(23,20,17,.06);
  margin-bottom: .7rem;
}
.avfb-grid .avfb-shot { background: #fff !important; }
@media (prefers-reduced-motion: reduce) {
  .avfb-grid li.product { transition: none; }
  .avfb-grid li.product:hover { transform: none; }
}

/* Book/grid pagination (v0.10) — real /page/N/ links under either view */
.avfb-pagination { margin: clamp(1.5rem, 4vw, 2.5rem) auto 0; display: flex; justify-content: center; }
.avfb-pagination ul.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; border: 0; list-style: none; }
.avfb-pagination ul.page-numbers li { border: 0; margin: 0; float: none; }
.avfb-pagination .page-numbers a,
.avfb-pagination .page-numbers span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); color: var(--av-ink, #F5EFE3); background: transparent;
  font-weight: 600; line-height: 1; text-decoration: none; transition: border-color .2s, color .2s, background-color .2s;
}
.avfb-pagination .page-numbers a:hover { border-color: var(--av-gold, #C9A24B); color: var(--av-gold, #C9A24B); }
.avfb-pagination .page-numbers span.current { background: var(--av-gold, #C9A24B); border-color: var(--av-gold, #C9A24B); color: #121212; }
.avfb-pagination .page-numbers span.dots { border-color: transparent; min-width: 24px; padding: 0 4px; }
.avfb-pagination .page-numbers a:focus-visible { outline: 2px solid var(--av-gold, #C9A24B); outline-offset: 2px; }

/* ===========================================================================
   v0.11 — fixes: pre-paint view, RTL arrows, disabled ends, qty input, toast
   =========================================================================== */
/* Saved view = book: never paint the grid first. The stage shows an empty
   book-shaped table until the flip book has built and its first images decoded. */
html[data-avfb-view="book"] .avfb-archive:not(.avfb-ready) .avfb-grid,
html[data-avfb-view="book"] .avfb-archive:not(.avfb-ready) .avfb-pagination { display: none; }
html[data-avfb-view="book"] .avfb-archive:not(.avfb-ready) .avfb-stage { display: block; }
html[data-avfb-view="book"] .avfb-archive .avfb-stage { min-block-size: min(78svh, 760px); }
html[data-avfb-view="book"] .avfb-archive:not(.avfb-book-shown) .avfb-book,
html[data-avfb-view="book"] .avfb-archive:not(.avfb-book-shown) .avfb-nav { opacity: 0; }
.avfb-archive .avfb-book { transition: opacity .35s cubic-bezier(.22, 1, .36, 1); }
html[data-avfb-view="grid"] .avfb-archive:not(.avfb-ready) .avfb-stage { display: none; }

/* RTL: arrows sit mirrored AND point the way they move */
.avfb-stage[data-rtl="1"] .avfb-prev,
.avfb-stage[data-rtl="1"] .avfb-next { transform: translateY(-50%) scaleX(-1); }
.avfb-prev[disabled], .avfb-next[disabled] { opacity: .28; cursor: default; pointer-events: none; }

/* back-cover filler used to pair RTL spreads */
.avfb-page--back { background: var(--avfb-leather); }

/* Mobile: keep the buy row on screen inside the page */
@media (max-width: 768px) {
  .avfb-page--buy .avfb-shot { max-height: 24svh; }
  .avfb-page--buy .avfb-desc { display: none; }
}

/* Quantity: real input between the steppers */
.avfb-qty { inline-size: auto; }
.avfb-qty__n {
  inline-size: 2.6rem; block-size: 44px; border: 0; background: transparent; color: inherit;
  font: inherit; font-weight: 700; text-align: center; padding: 0; -moz-appearance: textfield; appearance: textfield;
}
.avfb-qty__n::-webkit-outer-spin-button, .avfb-qty__n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.avfb-qty__n:focus-visible, .avfb-qty__btn:focus-visible { outline: 2px solid var(--avfb-gold); outline-offset: -2px; }
.avfb-qty__btn { inline-size: 40px; }
.avfb-grid .avfb-qty { color: #F2F2F2; border-color: rgba(201,162,75,.55); }
.avfb-grid .avfb-qty__btn { color: #F2F2F2; }
.avfb-grid .avfb-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.avfb-grid .avfb-actions .avfb-atc { flex: 1 1 8rem; }

/* Add-to-cart confirmation toast (sits above the mobile bottom nav) */
.avfb-toast {
  position: fixed; z-index: 450; inset-inline: 16px; inset-block-end: calc(84px + env(safe-area-inset-bottom));
  margin-inline: auto; max-inline-size: 420px;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem 1rem; border-radius: 12px; border: 1px solid rgba(201,162,75,.45);
  background: #1C1C1C; color: #F2F2F2; box-shadow: 0 14px 40px rgba(0,0,0,.45);
  font-size: .95rem; opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s cubic-bezier(.22,1,.36,1), transform .25s cubic-bezier(.22,1,.36,1);
}
.avfb-toast.is-on { opacity: 1; transform: none; pointer-events: auto; }
.avfb-toast__a { color: #E6BC66; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (min-width: 1024px) { .avfb-toast { inset-block-end: 28px; } }
@media (prefers-reduced-motion: reduce) { .avfb-toast, .avfb-archive .avfb-book { transition: none; } }
.avfb-book.avfb-fade { opacity: .25; transition: opacity .12s ease-out; }

/* Wishlist row: inline size chips + qty + add (v0.12) */
.avfb-product--inline { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; min-inline-size: 220px; }
.avfb-product--inline .avfb-sizes { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.avfb-product--inline .avfb-size { padding: .35rem .7rem; border-radius: 999px; border: 1px solid #6E6E6E; background: transparent; color: #F2F2F2; font-size: .85rem; cursor: pointer; display: inline-flex; gap: .35rem; align-items: baseline; }
.avfb-product--inline .avfb-size.is-selected { border-color: var(--avfb-gold); background: rgba(201,162,75,.14); color: #E6BC66; }
.avfb-product--inline .avfb-size__p { color: #B3B3B3; font-size: .8rem; }
.avfb-product--inline .avfb-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.avfb-product--inline .avfb-qty { color: #F2F2F2; border-color: rgba(201,162,75,.55); }
.avfb-product--inline .avfb-qty__btn { color: #F2F2F2; block-size: 40px; }
.avfb-product--inline .avfb-qty__n { block-size: 40px; }
.avfb-product--inline .avfb-atc { flex: 1 1 8rem; border-radius: 999px; background: var(--avfb-gold); color: #121212; font-weight: 800; border: 0; min-block-size: 40px; }
.avfb-product--inline .avfb-sizes--nudge { animation: avfb-nudge .5s; }

/* ===========================================================================
   BOOK PALETTE (v0.14) — four colours: black stage · cream pages · white photo
   panel · gold only for arrows, page numbers, stars, cover frame, selected price.
   Text: black titles/prices, neutral grey #6B6B6B secondary. No brown anywhere.
   =========================================================================== */
.avfb-archive {
  --bk-black: #0E0E0E; --bk-cream: #F5EFE3; --bk-white: #FFFFFF; --bk-edge: #E2D9C6;
  --bk-gold: #C9A24B; --bk-grey: #6B6B6B; --bk-line: #D9D2C3;
  --avfb-ink: var(--bk-black); --avfb-ink-soft: var(--bk-grey); --avfb-muted: var(--bk-grey);
  --avfb-paper: var(--bk-cream); --avfb-page: var(--bk-cream); --avfb-page-2: var(--bk-cream);
}
/* stage: solid black — no wood grain, no bronze, no vignette tint */
.avfb-stage { background: var(--bk-black) !important; box-shadow: none !important; border: 0; }
.avfb-book::before { background: radial-gradient(ellipse at center, rgba(0,0,0,.55), transparent 72%); }
/* pages: flat cream, 1px edge, soft BLACK spine shadow */
.avfb-page { background: var(--bk-cream) !important; color: var(--bk-black); box-shadow: inset 0 0 0 1px var(--bk-edge) !important; }
.avfb-page::before { content: none !important; }
.avfb-stage[data-rtl="1"] .avfb-page::after { background: linear-gradient(to left, rgba(0,0,0,.10), transparent) !important; }
.avfb-stage[data-rtl="0"] .avfb-page::after { background: linear-gradient(to right, rgba(0,0,0,.10), transparent) !important; }
/* cover: black, one thin gold frame, gold seal, cream title — no gradients */
.avfb-page--cover, .avfb-page--back { background: var(--bk-black) !important; border: 0 !important; box-shadow: none !important; }
.avfb-page--cover .avfb-cover__inner { position: relative; }
.avfb-page--cover::after { content: "" !important; position: absolute; inset: 14px; width: auto !important; border: 1px solid var(--bk-gold); background: none !important; pointer-events: none; }
.avfb-cover__seal { border-color: var(--bk-gold) !important; }
.avfb-cover__seal::after { color: var(--bk-gold) !important; }
.avfb-cover__title { color: var(--bk-cream) !important; }
.avfb-cover__kicker, .avfb-cover__line, .avfb-cover__count { color: var(--bk-cream) !important; opacity: .85; }
.avfb-cover__hint { color: rgba(245,239,227,.55) !important; }
/* product photo on a plain white panel */
.avfb-page--buy .avfb-shot__link, .avfb-spread__visual { background: var(--bk-white) !important; border: 1px solid var(--bk-edge); border-radius: 10px; padding: 10px; }
.avfb-page--buy .avfb-shot, .avfb-shot { mix-blend-mode: normal !important; filter: none !important; }
/* text */
.avfb-page .avfb-name, .avfb-page .avfb-name a, .avfb-page .avfb-price { color: var(--bk-black) !important; }
.avfb-page .avfb-brand { color: var(--bk-grey) !important; }
.avfb-page .avfb-desc, .avfb-page .avfb-perfumer, .avfb-page .avfb-votes, .avfb-page .avfb-ship, .avfb-page .avfb-rating-value { color: var(--bk-grey) !important; }
.avfb-page .avfb-stars, .avfb-stars { color: var(--bk-gold) !important; }
.avfb-pgnum { color: var(--bk-gold) !important; }
/* size buttons: white + light border; selected = black, cream text, gold price */
.avfb-page .avfb-size { background: var(--bk-white) !important; color: var(--bk-black) !important; border: 1px solid var(--bk-line) !important; box-shadow: none !important; }
.avfb-page .avfb-size .avfb-size__p { color: var(--bk-grey) !important; }
.avfb-page .avfb-size:hover:not(.is-unavailable) { border-color: var(--bk-black) !important; }
.avfb-page .avfb-size.is-selected { background: var(--bk-black) !important; color: var(--bk-cream) !important; border-color: var(--bk-black) !important; }
.avfb-page .avfb-size.is-selected .avfb-size__p { color: var(--bk-gold) !important; }
/* add to cart: black/cream → gold/black on hover; details: black outline; qty: white pill */
.avfb-page .avfb-atc { background: var(--bk-black) !important; color: var(--bk-cream) !important; border: 1px solid var(--bk-black) !important; box-shadow: none !important; filter: none !important; }
.avfb-page .avfb-atc:hover:not(:disabled) { background: var(--bk-gold) !important; color: var(--bk-black) !important; border-color: var(--bk-gold) !important; transform: none; }
.avfb-page .avfb-details { background: transparent !important; color: var(--bk-black) !important; border: 1px solid var(--bk-black) !important; border-radius: 999px; padding: .55rem 1rem; text-decoration: none !important; }
.avfb-page .avfb-details:hover { background: var(--bk-black) !important; color: var(--bk-cream) !important; }
.avfb-page .avfb-qty { background: var(--bk-white) !important; border: 1px solid var(--bk-line) !important; color: var(--bk-black) !important; }
.avfb-page .avfb-qty__btn, .avfb-page .avfb-qty__n { color: var(--bk-black) !important; }
/* notes chips: white with a hairline */
.avfb-page .avfb-note { background: var(--bk-white) !important; border: 1px solid var(--bk-line) !important; color: var(--bk-black) !important; }
.avfb-page .avfb-pyramid__label, .avfb-page .avfb-explore h4, .avfb-page .avfb-section-title { color: var(--bk-black) !important; }
/* arrows: gold on black */
.avfb-prev, .avfb-next { background: var(--bk-black) !important; color: var(--bk-gold) !important; border: 1px solid rgba(201,162,75,.55) !important; }
.avfb-prev:hover, .avfb-next:hover { background: var(--bk-gold) !important; color: var(--bk-black) !important; }
/* sale tag stays readable but not bronze */
.avfb-page .avfb-sale { background: var(--bk-black) !important; color: var(--bk-gold) !important; }
