/* ==========================================================================
   NEXR Luxury — dark overrides, homepage sections, WooCommerce experience.
   Loads after main.css + woo.css; tokens.css supplies the dark palette.
   ========================================================================== */

/* ---- Global dark refinements -------------------------------------------- */
body { background: var(--bg); color: var(--text); }
a { color: inherit; }
::selection { background: var(--c-brass); color: var(--c-accent-ink); }

/* Transparent header over hero, solid on scroll */
.has-transparent-header .site-header {
  background: transparent;
  border-block-end-color: transparent;
  box-shadow: none;
}
.has-transparent-header .site-header.is-scrolled {
  background: color-mix(in srgb, var(--c-ink) 92%, transparent);
  border-block-end-color: var(--border);
  backdrop-filter: saturate(1.2) blur(16px);
}
.site-header { --text: var(--c-ivory); }

/* Header logo — pinned top-left */
.site-header .header-bar { justify-content: flex-start; }
.site-header .brand { margin-inline-end: var(--space-l); margin-inline-start: 0; }
.brand__img,
.site-header .custom-logo { height: 40px; width: auto; display: block; }
@media (min-width: 960px) {
  .brand__img,
  .site-header .custom-logo { height: 46px; }
}

/* Search panel drops out of the dark header onto a light sheet */
.search-panel { --text: var(--c-ink); --text-muted: var(--c-muted); --border: var(--c-line); background: var(--bg); color: var(--c-ink); }
.search-panel input[type="search"], .search-panel input.search-field {
  background: var(--surface); color: var(--c-ink); border-color: var(--c-line-strong);
}

/* Buttons — brass primary, refined */
.btn { border-radius: var(--radius-s); text-transform: uppercase; letter-spacing: .16em; font-size: var(--step--1); font-weight: 600; }
.btn--block { width: 100%; justify-content: center; }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--c-brass); color: var(--c-brass); background: transparent; }

/* Reveal system (GSAP-driven; visible by default if JS/motion off) */
[data-reveal] { will-change: transform, opacity; }
.js .reveal-init [data-reveal] { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal-init [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   Homepage sections
   ========================================================================== */
/* --- Oula-matched homepage additions --------------------------------------- */
.lux-section--alt { background: var(--bg-alt); }
.lux-section__more { margin-block-start: var(--space-l); text-align: center; }

/* Hero button contrast over the photo */
.btn--invert { --btn-bg: #ffffff; --btn-fg: #111111; }
.btn--invert:hover { --btn-bg: #ececec; box-shadow: none; }
.btn--ghost-invert { --btn-bg: transparent; --btn-fg: #ffffff; border-color: rgba(255,255,255,.72); color: #fff; }
.btn--ghost-invert:hover { --btn-bg: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
.lux-hero__eyebrow { color: rgba(255,255,255,.85); }
.lux-hero__lead { color: rgba(255,255,255,.82); }

/* USP strip (thin, above the fold) */
.lux-usp-strip { border-block-end: 1px solid var(--border); padding-block: var(--space-l); }
.lux-usp-strip .lux-why { gap: var(--space-m); }
.lux-usp-strip .lux-why__item { display: flex; flex-direction: column; gap: .35rem; }
.lux-usp-strip .lux-why__item h3 { font-family: var(--font-body); font-size: var(--step-0); text-transform: none; letter-spacing: 0; margin-block: .4rem .1rem; }

/* Category placeholder (no category image set) */
.cat-tile__ph { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; color: rgba(255,255,255,.45); }

/* Newsletter (Oula-style, centered on white) */
.lux-newsletter { text-align: center; max-width: 42rem; margin-inline: auto; padding-block: var(--space-m); }
.lux-newsletter h2 { font-size: var(--step-4); text-transform: uppercase; }
.lux-newsletter__lead { color: var(--text-muted); margin-block: .6rem var(--space-l); }
.newsletter-form { display: flex; flex-wrap: wrap; gap: .5rem; max-width: 26rem; margin-inline: auto; }
.newsletter-form input { flex: 1 1 12rem; min-width: 0; min-height: 50px; padding: 0 1rem; border: 1px solid var(--c-line-strong); background: var(--surface); color: var(--text); font: inherit; border-radius: var(--radius-s); }
.newsletter-form .btn { flex: 0 0 auto; }
.newsletter-form input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.newsletter-form .btn { min-height: 50px; }

.lux-section { padding-block: var(--space-xl); }
.lux-section__head { max-width: 46rem; margin-block-end: var(--space-l); }
.lux-section__head h2 { font-size: var(--step-4); line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; }
.lux-section__head .eyebrow { margin-block-end: .5rem; }

/* Hero — Oula-proportioned banner (not full viewport) */
.lux-hero { position: relative; height: min(78vh, 46rem); min-height: 30rem; overflow: hidden; background: var(--c-ink); }
.lux-hero__media, .lux-hero__media video, .lux-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.lux-hero__ink { position: absolute; inset: 0; z-index: 2; }
.lux-hero__scrim { position: absolute; inset: 0; z-index: 3; background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.32) 42%, rgba(0,0,0,.04) 72%), linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 45%); pointer-events: none; }
.lux-hero .container { position: relative; z-index: 4; height: 100%; display: flex; align-items: flex-end; }
.lux-hero__inner { display: flex; flex-direction: column; padding-block: clamp(2.5rem, 7vh, 5rem); max-width: 46rem; }
.lux-hero__title { font-size: var(--step-6); line-height: 1; color: var(--c-ivory); text-transform: uppercase; }
.lux-hero__title .accent, .accent { color: #fff; font-style: normal; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.lux-hero__title .line { display: block; overflow: hidden; }
.lux-hero__title .line > span { display: block; }
.lux-hero__lead { max-width: 30rem; color: rgba(245,242,236,.72); margin-block-start: var(--space-m); font-size: var(--step-1); }
.lux-hero__cta { margin-block-start: var(--space-l); display: flex; gap: var(--space-s); flex-wrap: wrap; }
.lux-hero__scroll { position: absolute; inset-block-end: 2rem; inset-inline-start: 50%; transform: translateX(-50%); z-index: 4; }
.lux-hero__scroll span { display: block; width: 1px; height: 2.5rem; margin: .75rem auto 0; background: rgba(245,242,236,.4); transform-origin: top; animation: nexr-scroll 2.4s var(--ease-out) infinite; }
@keyframes nexr-scroll { 0%,100% { transform: scaleY(.3); opacity: .3; } 50% { transform: scaleY(1); opacity: 1; } }

/* USP / Why NEXR */
.lux-why { display: grid; gap: var(--space-l); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .lux-why { grid-template-columns: repeat(4, 1fr); } }
.lux-why__item svg { width: 30px; height: 30px; color: var(--c-brass); }
.lux-why__item h3 { font-size: var(--step-1); margin-block: .75rem .35rem; }
.lux-why__item p { color: var(--text-muted); font-size: var(--step--1); }

/* Pinned story */
.lux-story { position: relative; }
.lux-story__pin { min-height: 100svh; display: grid; place-items: center; }
.lux-story__track { display: flex; gap: var(--gutter); }
.lux-story__panel { flex: 0 0 min(90vw, 60rem); }
.lux-story__panel h2 { font-size: var(--step-5); }
.lux-story__panel p { max-width: 34rem; color: var(--text-muted); margin-block-start: var(--space-s); }

/* Editorial gallery (parallax) */
.lux-gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-m); }
.lux-gallery__fig { position: relative; overflow: hidden; border-radius: var(--radius-m); }
.lux-gallery__fig img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.lux-gallery__fig--a { grid-column: 1 / 8; aspect-ratio: 16/10; }
.lux-gallery__fig--b { grid-column: 8 / 13; aspect-ratio: 3/4; margin-block-start: var(--space-2xl); }
.lux-gallery__fig--c { grid-column: 1 / 5; aspect-ratio: 4/5; }
.lux-gallery__fig--d { grid-column: 5 / 13; aspect-ratio: 16/9; }
@media (max-width: 780px) { .lux-gallery__fig { grid-column: 1 / -1 !important; margin: 0 !important; } }

/* Lifestyle / promotional banner */
.lux-banner { position: relative; min-height: clamp(22rem, 48vh, 32rem); display: grid; place-items: center; overflow: hidden; text-align: center; background: var(--c-ink); }
.lux-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.lux-banner__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.lux-banner__inner { position: relative; z-index: 2; padding: var(--gutter); }
.lux-banner__inner h2 { font-size: var(--step-5); color: var(--c-ivory); text-transform: uppercase; }
.lux-banner__inner .eyebrow { color: rgba(255,255,255,.85) !important; }

/* Testimonials */
.lux-quotes { display: grid; gap: var(--space-xl); }
.lux-quote { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.3; font-style: italic; max-width: 46rem; }
.lux-quote__cite { display: block; margin-block-start: var(--space-s); font-family: var(--font-body); font-style: normal; font-size: var(--step--1); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); }

/* Instagram */
.lux-ig { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
@media (min-width: 720px) { .lux-ig { grid-template-columns: repeat(6, 1fr); } }
.lux-ig a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; }
.lux-ig img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.lux-ig a:hover img { transform: scale(1.08); }

/* Horizontal product carousel */
.lux-carousel { display: flex; gap: var(--space-m); overflow-x: auto; scroll-snap-type: x mandatory; padding-block-end: var(--space-s); }
.lux-carousel > * { flex: 0 0 78%; scroll-snap-align: start; }
@media (min-width: 720px) { .lux-carousel > * { flex-basis: 34%; } }
@media (min-width: 1100px) { .lux-carousel > * { flex-basis: 23%; } }

/* ==========================================================================
   WooCommerce — luxury experience
   ========================================================================== */
.badge { position: absolute; z-index: 2; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .55rem; border-radius: var(--radius-pill); }
.badge--sale { background: var(--c-danger); color: #fff; }
.badge--new { background: var(--c-ink); color: var(--c-ivory); }
.badge--out { background: var(--c-surface-2); color: var(--text-muted); border: 1px solid var(--c-line-strong); }

/* Product card refinements over base .product-card */
.product-card__media { background: var(--surface); }
.product-card__imgwrap { position: relative; display: block; width: 100%; height: 100%; }
.product-card__imgwrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card__imghover { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-slow) var(--ease-out); }
.product-card__imghover img { width: 100%; height: 100%; object-fit: cover; }
.product-card:hover .product-card__imghover { opacity: 1; }
.nexr-attr { margin-block: var(--space-s); }
.nexr-attr__label { display: block; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .14em; color: var(--text-muted); margin-block-end: .5rem; }
.nexr-add-to-cart.is-loading { opacity: .6; pointer-events: none; }
.recently-viewed { border-block-start: 1px solid var(--border); }
.product-card .nexr-quickview {
  position: absolute; inset-inline: 10px; inset-block-end: 54px; z-index: 3;
  height: 42px; display: flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--c-ink) 55%, transparent);
  color: var(--c-ivory); font-size: var(--step--1); text-transform: uppercase; letter-spacing: .14em;
  backdrop-filter: blur(8px); border-radius: var(--radius-s);
  opacity: 0; transform: translateY(10px); transition: all var(--dur-base) var(--ease-out);
}
.product-card:hover .nexr-quickview { opacity: 1; transform: none; }
.product-card .nexr-wishlist {
  position: absolute; inset-block-start: 10px; inset-inline-end: 10px; z-index: 3;
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--c-ink) 55%, transparent); color: var(--c-ivory);
  border: 1px solid var(--border); backdrop-filter: blur(8px); transition: color var(--dur-fast), background var(--dur-fast);
}
.product-card .nexr-wishlist:hover, .product-card .nexr-wishlist.is-active { color: var(--c-oxblood); background: var(--c-ivory); }
.product-card .nexr-wishlist svg { width: 18px; height: 18px; }

/* Color swatches */
.nexr-swatches { display: flex; gap: .4rem; margin-block-start: .6rem; }
.nexr-swatch { width: 16px; height: 16px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; }
.nexr-swatch.is-active { box-shadow: inset 0 0 0 1px var(--c-brass), 0 0 0 2px var(--c-brass); }
.nexr-size-swatches { display: flex; flex-wrap: wrap; gap: .4rem; }
.nexr-size { min-width: 44px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-s); font-size: var(--step--1); cursor: pointer; }
.nexr-size.is-active { border-color: var(--c-brass); color: var(--c-brass); }

/* Sticky add-to-cart (single product) */
.nexr-sticky-atc {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-sticky);
  transform: translateY(110%); transition: transform var(--dur-base) var(--ease-out);
  background: var(--surface); color: var(--text);
  border-block-start: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(0,0,0,.10);
}
.nexr-sticky-atc__price { color: var(--text); }
.nexr-sticky-atc.is-visible { transform: none; }
.nexr-sticky-atc__inner { display: flex; align-items: center; gap: var(--space-m); padding-block: .75rem; }
.nexr-sticky-atc__name { font-family: var(--font-display); font-size: var(--step-1); margin-inline-end: auto; }
.nexr-sticky-atc__price { color: var(--c-brass); font-weight: 600; }

/* Cart drawer */
.cart-drawer { position: fixed; inset: 0; z-index: var(--z-modal); visibility: hidden; pointer-events: none; }
.cart-drawer.is-open { visibility: visible; pointer-events: auto; }
.cart-drawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.cart-drawer.is-open .cart-drawer__scrim { opacity: 1; }
.cart-drawer__panel {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: min(92vw, 30rem);
  background: var(--surface); color: var(--text); border-inline-start: 1px solid var(--border);
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out); box-shadow: var(--shadow-3);
}
.cart-drawer__price { color: var(--text-muted); }
[dir="rtl"] .cart-drawer__panel { inset-inline-end: auto; inset-inline-start: 0; transform: translateX(-100%); }
.cart-drawer.is-open .cart-drawer__panel { transform: none; }
.cart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-m); border-block-end: 1px solid var(--border); }
.cart-drawer__head h2 { font-size: var(--step-2); }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: var(--space-m); }
.cart-drawer__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-m); }
.cart-drawer__item { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--space-s); align-items: start; }
.cart-drawer__thumb img { border-radius: var(--radius-s); }
.cart-drawer__name { font-size: var(--step-0); }
.cart-drawer__price { color: var(--c-brass); font-size: var(--step--1); margin-block: .2rem; }
.cart-drawer__qty { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: .15rem .5rem; }
.cart-drawer__qty .qty-btn { width: 24px; height: 24px; color: var(--text); }
.cart-drawer__remove { color: var(--text-muted); font-size: 1.4rem; line-height: 1; }
.cart-drawer__foot { padding: var(--space-m); border-block-start: 1px solid var(--border); }
.cart-drawer__subtotal { display: flex; justify-content: space-between; margin-block-end: var(--space-s); font-size: var(--step-1); }
.cart-drawer__viewcart { display: block; text-align: center; margin-block-start: .75rem; font-size: var(--step--1); color: var(--text-muted); text-transform: uppercase; letter-spacing: .14em; }
.cart-drawer__empty { text-align: center; padding-block: var(--space-xl); display: grid; gap: var(--space-m); place-items: center; }

/* Quick view modal */
.nexr-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; visibility: hidden; pointer-events: none; padding: var(--gutter); }
.nexr-modal.is-open { visibility: visible; pointer-events: auto; }
.nexr-modal__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.7); opacity: 0; transition: opacity var(--dur-base); }
.nexr-modal.is-open .nexr-modal__scrim { opacity: 1; }
.nexr-modal__panel { position: relative; width: min(64rem, 100%); max-height: 88vh; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-m); transform: scale(.96); opacity: 0; transition: all var(--dur-base) var(--ease-out); }
.nexr-modal.is-open .nexr-modal__panel { transform: none; opacity: 1; }
.nexr-modal__close { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; color: var(--text); }
.quick-view { display: grid; gap: var(--space-l); padding: var(--space-l); }
@media (min-width: 800px) { .quick-view { grid-template-columns: 1fr 1fr; align-items: center; } }
.quick-view__media { position: relative; border-radius: var(--radius-m); overflow: hidden; background: var(--surface); }
.quick-view__title { font-size: var(--step-3); }
.quick-view__price { color: var(--c-brass); font-size: var(--step-2); margin-block: .5rem; }
.quick-view__excerpt { color: var(--text-muted); }
.quick-view__actions { display: flex; gap: .75rem; margin-block-start: var(--space-m); flex-wrap: wrap; }

/* Recently viewed / related use base .product-grid */
.nexr-toast { position: fixed; inset-block-end: 24px; inset-inline-start: 50%; transform: translate(-50%, 20px); z-index: var(--z-toast); background: var(--c-surface-2); border: 1px solid var(--border); color: var(--text); padding: .8rem 1.2rem; border-radius: var(--radius-pill); font-size: var(--step--1); opacity: 0; transition: all var(--dur-base) var(--ease-out); pointer-events: none; }
.nexr-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Magnetic wrapper */
.magnetic { display: inline-flex; will-change: transform; }

/* Footer refinements (dark already) */
.site-footer { background: var(--c-ink); }

/* Page heads / prose */
.page-head { padding-block: var(--space-xl) var(--space-l); }
.page-title { font-size: var(--step-5); }
.display-title { font-size: var(--step-6); }
.layout-with-sidebar { display: grid; gap: var(--space-xl); }
@media (min-width: 1000px) { .layout-with-sidebar:not(.no-aside) { grid-template-columns: 1fr 20rem; } }
.post-grid { display: grid; gap: var(--space-l); grid-template-columns: 1fr; }
@media (min-width: 760px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
.post-card__media { display: block; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 16/11; margin-block-end: var(--space-s); background: var(--surface); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__title { font-size: var(--step-2); margin-block: .5rem; }
.prose { max-width: 42rem; line-height: var(--lh-body); }
.prose > * + * { margin-block-start: var(--space-s); }
.prose a { color: var(--c-brass); text-decoration: underline; text-underline-offset: 3px; }
.error-404 { min-height: 70svh; display: grid; place-items: center; text-align: center; }
.error-404__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-block: var(--space-l); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
