/*
Theme Name:  Raven — The Lost Tear
Theme URI:   https://authornraven.com/
Author:      Raven Nguyen
Author URI:  https://authornraven.com/
Description: Dark navy/plum + gold romantasy theme with starfield background, ported from the original Next.js authornraven.com site. Block theme (theme.json + template parts) with a full set of block patterns for the book landing, story blurb, praise, merch grid, author bio, book detail, and shop.
Version:     1.4.3
Requires at least: 6.7
Tested up to:      6.7
Requires PHP: 8.0
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: raven-lostmoon
Tags:        block-theme, dark, one-column, portfolio, book
*/

/* ---------------------------------------------------------------------------
   Base + starfield — 1:1 with src/app/globals.css of the Next.js original.
--------------------------------------------------------------------------- */

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  background-color: #0c1128;
  background-image:
    radial-gradient(ellipse 80% 60% at 15% -10%, rgb(67 32 122 / 0.55), transparent 60%),
    radial-gradient(ellipse 70% 50% at 95% 10%, rgb(34 48 106 / 0.6),  transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgb(45 21 83 / 0.5),  transparent 65%);
  background-attachment: fixed;
  color: #ede8f8;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff8, transparent),
    radial-gradient(1px 1px at 72% 32%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #e9dcff88, transparent),
    radial-gradient(1px 1px at 85% 80%, #fff5, transparent),
    radial-gradient(1px 1px at 25% 90%, #fff4, transparent),
    radial-gradient(1.5px 1.5px at 58% 12%, #ecd9a877, transparent),
    radial-gradient(1px 1px at 93% 55%, #fff5, transparent),
    radial-gradient(1px 1px at 5% 50%, #fff4, transparent);
  background-size: 600px 600px;
}
body > * { position: relative; z-index: 1; }

:focus-visible { outline: 2px solid #d8b46a; outline-offset: 3px; }

/* ---------------------------------------------------------------------------
   Sticky header. backdrop-filter is pushed to a ::before layer so the header
   itself does NOT create a new stacking context: core/navigation's responsive
   overlay is `position: fixed`, and when its ancestor creates a new context
   the overlay is clipped to the header instead of covering the viewport.
   That bug ate the mobile menu. Giving the header a near-opaque fallback
   background means the content below never bleeds through even in browsers
   that silently drop backdrop-filter.
--------------------------------------------------------------------------- */
.raven-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgb(196 178 240 / 0.1);
  background: rgba(12, 17, 40, 0.92);
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .raven-site-header {
    background: transparent;
  }
  .raven-site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(12, 17, 40, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* ---------------------------------------------------------------------------
   Mobile navigation — hamburger button + full-viewport overlay.
   Styled to feel like a continuation of the site: starfield, moon ornament,
   gold hairline divider between items, gilded Cinzel labels.
--------------------------------------------------------------------------- */

/* Hamburger trigger — styling only. Visibility (hidden on wide screens,
   shown on narrow) is left entirely to core/navigation's own breakpoint
   rules; adding display:none here killed it on mobile too. */
.wp-block-navigation__responsive-container-open {
  background: transparent !important;
  border: 1px solid rgba(196, 178, 240, 0.35) !important;
  border-radius: 999px !important;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  color: #c4b2f0 !important;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.wp-block-navigation__responsive-container-open:hover,
.wp-block-navigation__responsive-container-open:focus-visible {
  color: #ecd9a8 !important;
  border-color: #d8b46a !important;
  box-shadow: 0 0 18px rgba(216, 180, 106, 0.3);
}
.wp-block-navigation__responsive-container-open svg {
  width: 20px;
  height: 20px;
}

/* The fullscreen overlay */
.wp-block-navigation__responsive-container.is-menu-open {
  z-index: 10000 !important;
  padding: 0 !important;
  /* Core sets a background colour inline on the <div>; we paint our own
     glowing background on ::before so the color prop stays themeable. */
  background-color: transparent !important;
}
.wp-block-navigation__responsive-container.is-menu-open::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0c1128;
  background-image:
    radial-gradient(ellipse 70% 60% at 20% 10%, rgba(67, 32, 122, 0.75), transparent 65%),
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(34, 48, 106, 0.75), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(45, 21, 83, 0.7), transparent 70%),
    /* starfield */
    radial-gradient(1.5px 1.5px at 12% 18%, #fff9, transparent),
    radial-gradient(1px 1px at 72% 32%, #fff7, transparent),
    radial-gradient(2px 2px at 40% 70%, #e9dcffaa, transparent),
    radial-gradient(1px 1px at 85% 80%, #fff6, transparent),
    radial-gradient(1px 1px at 25% 90%, #fff5, transparent),
    radial-gradient(1.5px 1.5px at 58% 12%, #ecd9a888, transparent),
    radial-gradient(1px 1px at 93% 55%, #fff6, transparent),
    radial-gradient(1px 1px at 5% 50%, #fff5, transparent);
  background-size: 100% 100%, 100% 100%, 100% 100%, 420px 420px, 420px 420px,
                   420px 420px, 420px 420px, 420px 420px, 420px 420px,
                   420px 420px, 420px 420px;
}

/* Fade the overlay in */
.wp-block-navigation__responsive-container.is-menu-open {
  animation: raven-overlay-fade 0.35s ease forwards;
}
@keyframes raven-overlay-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Decorative gold crescent floating behind the labels.
   Rendered as an inline SVG background so mask-composite browser quirks
   don't matter — a gold circle has a dark circle "subtracted" from it via
   an SVG <mask>, leaving a classic crescent sliver. */
.wp-block-navigation__responsive-container.is-menu-open::after {
  content: "";
  position: absolute;
  inset: auto 0 8vh;
  margin: 0 auto;
  width: 120px;
  height: 120px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  filter: drop-shadow(0 0 28px rgba(216, 180, 106, 0.55));
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ecd9a8'/><stop offset='0.6' stop-color='%23d8b46a'/><stop offset='1' stop-color='%23a8823f'/></linearGradient><mask id='m'><rect width='120' height='120' fill='white'/><circle cx='78' cy='52' r='44' fill='black'/></mask></defs><circle cx='56' cy='60' r='50' fill='url(%23g)' mask='url(%23m)'/></svg>") center/contain no-repeat;
}

/* Close (X) button — scoped to the open overlay only so it doesn't leak onto
   the desktop header. Flexbox-centered so the SVG sits in the middle. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
  position: absolute !important;
  top: 1.1rem !important;
  right: 1.1rem !important;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  border: 1px solid rgba(196, 178, 240, 0.35) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #c4b2f0 !important;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close:focus-visible {
  color: #ecd9a8 !important;
  border-color: #d8b46a !important;
  transform: rotate(90deg);
  box-shadow: 0 0 18px rgba(216, 180, 106, 0.3);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0;
}
/* And an explicit guard: if the overlay is NOT open, never show the close
   button. (Core hides it via its container; this is belt-and-braces for
   browsers that leak it out of the collapsed container.) */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-close {
  display: none !important;
}

/* Content area — center the ul vertically + horizontally */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}

/* The nav list inside the overlay */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  width: min(360px, 100%);
}

/* Each nav item — large Cinzel label, gilded hairline divider between */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  width: 100%;
  text-align: center;
  position: relative;
  opacity: 0;
  animation: raven-nav-rise 0.45s ease forwards;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(1) { animation-delay: 0.12s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: 0.20s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: 0.28s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: 0.36s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: 0.44s; }

@keyframes raven-nav-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* The link itself */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  display: block !important;
  padding: 1.1rem 0 !important;
  position: relative;
  color: #ede8f8 !important;
  background: transparent !important;
  transition: color 0.2s ease, letter-spacing 0.3s ease;
}

/* Gold hairline between items, gradient-fading at the edges */
.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item + .wp-block-navigation-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 180, 106, 0.55), transparent);
}

/* The label text */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__label {
  font-family: var(--wp--preset--font-family--display), serif !important;
  font-size: 1.35rem !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase;
  color: #ede8f8 !important;
  transition: color 0.2s ease, letter-spacing 0.3s ease;
  display: inline-block;
}

/* Hover + active-page states */
.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item__content:hover .wp-block-navigation-item__label,
.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item__content:focus-visible .wp-block-navigation-item__label {
  color: #ecd9a8 !important;
  letter-spacing: 0.36em !important;
  text-shadow: 0 0 24px rgba(216, 180, 106, 0.5);
}
.wp-block-navigation__responsive-container.is-menu-open
  .current-menu-item .wp-block-navigation-item__content {
  border: 0 !important;
  padding: 1.1rem 0 !important;
}
.wp-block-navigation__responsive-container.is-menu-open
  .current-menu-item .wp-block-navigation-item__label {
  color: #ecd9a8 !important;
  background: linear-gradient(180deg, #ecd9a8, #d8b46a 60%, #a8823f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Lock body scroll when the menu is open (core adds .has-modal-open on html) */
html.has-modal-open,
html.has-modal-open body {
  overflow: hidden !important;
}

/* Site title — big-capped, gold-soft, 0.2em tracking */
.wp-block-site-title a {
  font-family: var(--wp--preset--font-family--display), serif;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: #ecd9a8;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.wp-block-site-title a:hover { color: #d8b46a; }

/* Navigation — small caps, mist->lavender hover, gold box on current page. */
.wp-block-navigation .wp-block-navigation-item__label {
  font-family: var(--wp--preset--font-family--display), serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a49dc4;
  transition: color 0.2s ease;
}
.wp-block-navigation .wp-block-navigation-item__content:hover .wp-block-navigation-item__label {
  color: #c4b2f0;
}
/* Active-page gold-outlined box (see user screenshot: THE BOOK  [SHOP]  AUTHOR) */
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .current_page_item > .wp-block-navigation-item__content,
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation .current_page_item > a {
  border: 1px solid rgb(216 180 106 / 0.55);
  padding: 0.5rem 1rem;
  border-radius: 2px;
}
.wp-block-navigation .current-menu-item .wp-block-navigation-item__label,
.wp-block-navigation .current_page_item .wp-block-navigation-item__label {
  color: #ecd9a8;
}

/* WooCommerce auto-injects a customer-account link inside the navigation —
   the user-silhouette SVG reads as a second cart at glance size. Not used
   anywhere else on the site, so hide every instance (not just the header
   one) and defeat any inline/injected display value with !important. */
.wp-block-woocommerce-customer-account,
.wc-block-customer-account,
.wc-block-customer-account__link {
  display: none !important;
  visibility: hidden !important;
}

/* Cart icon in the header. */
.raven-cart-icon {
  display: inline-flex;
  align-items: center;
  color: #c4b2f0;
  transition: color 0.2s ease;
  position: relative;
  text-decoration: none;
}
.raven-cart-icon:hover { color: #ecd9a8; }
.raven-cart-icon svg { width: 22px; height: 22px; display: block; }
.raven-cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d8b46a;
  color: #140a26;
  font-family: var(--wp--preset--font-family--sans), system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

/* ---------------------------------------------------------------------------
   Utility classes reused inside block patterns
--------------------------------------------------------------------------- */

.gold-text {
  background: linear-gradient(180deg, #ecd9a8, #d8b46a 60%, #a8823f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.raven-divider {
  display: flex; align-items: center; gap: 1rem;
  color: #d8b46a;
  font-family: var(--wp--preset--font-family--display), serif;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin: 0 0 1.5rem 0;
}
.raven-divider::before,
.raven-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(216 180 106 / 0.5), transparent);
}

.raven-card {
  background: linear-gradient(160deg, rgb(45 21 83 / 0.55), rgb(15 23 57 / 0.7));
  border: 1px solid rgb(196 178 240 / 0.14);
  border-radius: 1rem;
  backdrop-filter: blur(6px);
  padding: 1.75rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.raven-card:hover {
  border-color: rgb(216 180 106 / 0.5);
}

/* Buttons — round pills. .btn-gold has the gold-glow hover from the original. */
.raven-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  font-family: var(--wp--preset--font-family--display), serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s ease;
}
.raven-btn.is-gold {
  background: linear-gradient(180deg, #ecd9a8, #d8b46a);
  color: #140a26;
  box-shadow: 0 0 24px rgb(216 180 106 / 0.25);
}
.raven-btn.is-gold:hover {
  box-shadow: 0 0 36px rgb(216 180 106 / 0.45);
  transform: translateY(-1px);
}
.raven-btn.is-ghost {
  border: 1px solid rgb(196 178 240 / 0.4);
  color: #c4b2f0;
  background: transparent;
}
.raven-btn.is-ghost:hover {
  background: rgb(196 178 240 / 0.08);
  border-color: #c4b2f0;
}

/* Same gold-glow hover applied to core buttons when the .btn-gold class is present. */
.wp-block-button.raven-glow .wp-block-button__link {
  box-shadow: 0 0 24px rgb(216 180 106 / 0.25);
  transition: all 0.2s ease;
}
.wp-block-button.raven-glow .wp-block-button__link:hover {
  box-shadow: 0 0 36px rgb(216 180 106 / 0.45);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------------------
   Holographic sheen — foil-card refraction on the gold buttons.
   Two stacked layers on ::before / ::after over the existing gold gradient:
     • idle: a slow-drifting spectrum tint at low opacity (color-dodge blend)
     • hover: a diagonal specular sweep that traverses the button once
--------------------------------------------------------------------------- */
.wp-block-button.raven-glow .wp-block-button__link,
.raven-btn.is-gold {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.wp-block-button.raven-glow .wp-block-button__link::before,
.raven-btn.is-gold::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(196, 178, 240, 0.35) 20%,
    rgba(216, 180, 106, 0.15) 35%,
    rgba(236, 217, 168, 0.55) 50%,
    rgba(216, 180, 106, 0.15) 65%,
    rgba(196, 178, 240, 0.35) 80%,
    transparent 100%
  );
  background-size: 220% 220%;
  background-position: 0% 50%;
  mix-blend-mode: color-dodge;
  animation: raven-holo-drift 6s linear infinite;
}

.wp-block-button.raven-glow .wp-block-button__link::after,
.raven-btn.is-gold::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.7) 48%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.7) 52%,
    transparent 70%
  );
  background-size: 250% 100%;
  background-position: 150% 0;
  transition: background-position 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
  mix-blend-mode: overlay;
}

.wp-block-button.raven-glow .wp-block-button__link:hover::after,
.raven-btn.is-gold:hover::after {
  background-position: -50% 0;
}

/* Keep the label above both sheen layers. */
.wp-block-button.raven-glow .wp-block-button__link,
.raven-btn.is-gold { z-index: 0; }
.wp-block-button.raven-glow .wp-block-button__link > *,
.raven-btn.is-gold > * { position: relative; z-index: 2; }

@keyframes raven-holo-drift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}
.wp-block-button.is-style-outline .wp-block-button__link {
  transition: all 0.2s ease;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: rgb(196 178 240 / 0.08);
  border-color: #c4b2f0 !important;
}

.raven-tropes { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 2rem 0 0 0; }
.raven-tropes li {
  border: 1px solid rgb(196 178 240 / 0.45);
  background: rgb(34 48 106 / 0.55);
  color: #ede8f8;
  padding: .25rem .8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-family: var(--wp--preset--font-family--sans), system-ui, sans-serif;
}

.raven-praise-mark {
  font-family: var(--wp--preset--font-family--serif), Georgia, serif;
  font-size: 4rem;
  line-height: 1;
  color: #d8b46a;
}

.raven-excerpt {
  border-left: 2px solid rgb(216 180 106 / 0.5);
  padding-left: 1.5rem;
  font-family: var(--wp--preset--font-family--serif), Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.7;
  color: rgb(237 232 248 / 0.9);
}

/* ---------------------------------------------------------------------------
   Product cards (shop / merch grid) — hover zoom on the art, gold border tint
--------------------------------------------------------------------------- */
.raven-product-card {
  background: linear-gradient(160deg, rgb(45 21 83 / 0.55), rgb(15 23 57 / 0.7));
  border: 1px solid rgb(196 178 240 / 0.14);
  border-radius: 1rem;
  backdrop-filter: blur(6px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.raven-product-card:hover {
  border-color: rgb(216 180 106 / 0.5);
}
.raven-product-art {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.raven-product-art > svg,
.raven-product-art > img {
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}
.raven-product-card:hover .raven-product-art > svg,
.raven-product-card:hover .raven-product-art > img {
  transform: scale(1.05);
}
.raven-product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.raven-product-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}
.raven-product-title a {
  font-family: var(--wp--preset--font-family--serif), Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.2;
  color: #ede8f8;
  text-decoration: none;
  transition: color 0.2s ease;
}
.raven-product-title a:hover { color: #ecd9a8; }
.raven-product-price {
  font-family: var(--wp--preset--font-family--display), serif;
  font-size: 0.9rem;
  color: #ecd9a8;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.raven-product-short {
  font-family: var(--wp--preset--font-family--sans), system-ui, sans-serif;
  font-size: 0.85rem;
  color: #a49dc4;
  margin: 0;
}
.raven-product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #d8b46a;
  color: #140a26;
  font-family: var(--wp--preset--font-family--display), serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 2;
}
.raven-product-art-wrap { position: relative; }

/* WooCommerce product tiles — reuse the same look on WC-generated markup. */
.woocommerce ul.products li.product,
ul.products li.product {
  background: linear-gradient(160deg, rgb(45 21 83 / 0.55), rgb(15 23 57 / 0.7));
  border: 1px solid rgb(196 178 240 / 0.14);
  border-radius: 1rem;
  padding: 1rem !important;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.woocommerce ul.products li.product:hover,
ul.products li.product:hover {
  border-color: rgb(216 180 106 / 0.5);
}
.woocommerce ul.products li.product img,
ul.products li.product img {
  transition: transform 0.5s ease;
}
.woocommerce ul.products li.product:hover img,
ul.products li.product:hover img {
  transform: scale(1.05);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--wp--preset--font-family--serif), Georgia, serif !important;
  color: #ede8f8 !important;
  font-size: 1.15rem !important;
}
.woocommerce ul.products li.product .price {
  font-family: var(--wp--preset--font-family--display), serif !important;
  color: #ecd9a8 !important;
}
.woocommerce ul.products li.product .button {
  background: linear-gradient(180deg, #ecd9a8, #d8b46a) !important;
  color: #140a26 !important;
  border-radius: 999px !important;
  font-family: var(--wp--preset--font-family--display), serif !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  padding: 0.6rem 1.2rem !important;
  transition: all 0.2s ease !important;
}
.woocommerce ul.products li.product .button:hover {
  box-shadow: 0 0 24px rgb(216 180 106 / 0.35);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------------------
   Checkout / cart / my-account form fields.
   WC block-checkout renders inputs with a hard white background; body's
   light ink color makes typed text invisible. Restyle inputs to match the
   theme (deep navy fill, lavender border, ink text, gold focus ring).
--------------------------------------------------------------------------- */
.wc-block-checkout input,
.wc-block-checkout textarea,
.wc-block-checkout select,
.wc-block-components-text-input input,
.wc-block-components-address-form input,
.wc-block-components-address-form select,
.wc-block-cart input[type="text"],
.wc-block-cart input[type="email"],
.wc-block-cart input[type="tel"],
.wc-block-cart input[type="number"],
form.woocommerce-form input[type="text"],
form.woocommerce-form input[type="email"],
form.woocommerce-form input[type="password"],
form.woocommerce-form input[type="tel"],
form.woocommerce-form textarea,
form.woocommerce-form select {
  background: rgb(15 22 51 / 0.85) !important;
  color: #ede8f8 !important;
  border: 1px solid rgb(196 178 240 / 0.28) !important;
  border-radius: 6px !important;
  caret-color: #ecd9a8;
}
.wc-block-checkout input:focus,
.wc-block-checkout textarea:focus,
.wc-block-checkout select:focus,
.wc-block-components-text-input input:focus,
form.woocommerce-form input:focus,
form.woocommerce-form textarea:focus,
form.woocommerce-form select:focus {
  outline: none !important;
  border-color: #d8b46a !important;
  box-shadow: 0 0 0 3px rgb(216 180 106 / 0.15) !important;
}
/* Floating labels used by WC block checkout */
.wc-block-components-text-input label,
.wc-block-components-checkbox__label,
.wc-block-components-radio-control__label {
  color: #a49dc4 !important;
}
.wc-block-components-text-input.is-active label,
.wc-block-components-text-input input:focus + label {
  color: #ecd9a8 !important;
}
/* Placeholder text (WC hides real placeholders behind labels — this covers
   the classic-cart / my-account forms). */
.wc-block-checkout ::placeholder,
form.woocommerce-form ::placeholder {
  color: rgb(196 178 240 / 0.5) !important;
}
/* Native <select> arrow becomes invisible on the dark fill; keep the WC
   arrow indicator on top by leaving the built-in ::after alone but tinting. */
.wc-block-components-select .wc-block-components-select__select,
form.woocommerce-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #c4b2f0 50%),
                    linear-gradient(135deg, #c4b2f0 50%, transparent 50%) !important;
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55% !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
  padding-right: 2.5rem !important;
}
/* Autofill (Chrome saved-address) — override the yellow/white autofill fill. */
.wc-block-checkout input:-webkit-autofill,
form.woocommerce-form input:-webkit-autofill {
  -webkit-text-fill-color: #ede8f8 !important;
  -webkit-box-shadow: 0 0 0 1000px rgb(15 22 51 / 1) inset !important;
  caret-color: #ecd9a8;
}
/* Order-summary card + right-rail on checkout — dark card treatment. */
.wc-block-components-sidebar-layout .wc-block-components-sidebar,
.wc-block-checkout__sidebar,
.wc-block-cart__sidebar {
  background: linear-gradient(160deg, rgb(45 21 83 / 0.55), rgb(15 23 57 / 0.7)) !important;
  border: 1px solid rgb(196 178 240 / 0.14) !important;
  border-radius: 1rem !important;
}
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value,
.wc-block-components-product-name,
.wc-block-components-product-price {
  color: #ede8f8 !important;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: #ecd9a8 !important;
}
/* Place-order + primary checkout buttons carry the gold gradient. */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
  background: linear-gradient(180deg, #ecd9a8, #d8b46a) !important;
  color: #140a26 !important;
  border-radius: 999px !important;
  font-family: var(--wp--preset--font-family--display), serif !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  transition: all 0.2s ease !important;
}
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-button:hover {
  box-shadow: 0 0 36px rgb(216 180 106 / 0.45) !important;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------------------
   Hero book-cover panel (right column). Keeps 2:3 aspect ratio, gold ring,
   deep drop shadow — the SVG inside carries the moon/teardrop illustration.
--------------------------------------------------------------------------- */
.raven-book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid rgb(216 180 106 / 0.35);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.7), inset 0 0 60px rgb(196 178 240 / 0.08);
}
.raven-book-cover svg,
.raven-book-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ---------------------------------------------------------------------------
   Editions grid on /book/. Three cards auto-flow and stack naturally when
   the sidebar steals width (sticky cover column), avoiding the squeezed
   three-wp:columns look.
--------------------------------------------------------------------------- */
.raven-editions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.raven-edition-card {
  display: block;
  text-decoration: none;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgb(196 178 240 / 0.14);
  background: linear-gradient(160deg, rgb(45 21 83 / 0.55), rgb(15 23 57 / 0.7));
  backdrop-filter: blur(6px);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.raven-edition-card:hover {
  border-color: rgb(216 180 106 / 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
}
.raven-edition-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}
.raven-edition-name {
  font-family: var(--wp--preset--font-family--serif), Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.3;
  color: #ede8f8;
}
.raven-edition-price {
  font-family: var(--wp--preset--font-family--display), serif;
  color: #ecd9a8;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.raven-edition-blurb {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: #a49dc4;
}

/* ---------------------------------------------------------------------------
   Art gallery grid used by patterns/art.php and patterns/art-teaser.php.
--------------------------------------------------------------------------- */
.raven-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.raven-art-grid--teaser {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.raven-art-tile {
  display: block;
  margin: 0;
  text-decoration: none;
  border: 1px solid rgb(196 178 240 / 0.18);
  border-radius: 1rem;
  overflow: hidden;
  background: #0f1739;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.raven-art-tile:hover {
  border-color: rgb(216 180 106 / 0.5);
  transform: translateY(-2px);
}
.raven-art-tile svg,
.raven-art-tile img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}
.raven-art-tile:hover svg,
.raven-art-tile:hover img {
  transform: scale(1.03);
}
.raven-art-tile figcaption {
  padding: 1rem 1.25rem 1.25rem;
  font-family: var(--wp--preset--font-family--display), serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ecd9a8;
}

/* ---------------------------------------------------------------------------
   Sticky book-detail cover column — matches md:sticky md:top-28 md:self-start
--------------------------------------------------------------------------- */
@media (min-width: 782px) {
  .raven-sticky-col {
    position: sticky;
    top: 7rem;
    align-self: flex-start;
  }
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
