/* =========================================================
   Bella — Design System & Layout
   All measurements/tokens are the current, tested design system —
   see CURRENT_SITE_AUDIT.md for file/asset provenance notes.
   ========================================================= */

@font-face { font-family: 'Alexandria'; src: url('assets/fonts/alexandria-400.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('assets/fonts/alexandria-600.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alexandria'; src: url('assets/fonts/alexandria-700.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('assets/fonts/manrope-400.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('assets/fonts/manrope-600.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('assets/fonts/manrope-700.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('assets/fonts/cormorant-garamond-600.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('assets/fonts/cormorant-garamond-700.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Brand palette — Bella purple/lavender identity. Page background is
     true white; lavender is reserved for controlled accent areas
     (buttons, borders, cards, strips, icons) so the page reads bright
     and clean rather than tinted/washed-out. */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #fcfafd;
  --color-text: #241c30;
  --color-text-muted: #5f5268;
  --color-accent: #8a6d9a;
  --color-accent-dark: #755584;
  --color-accent-light: #f4f0f6;
  --color-accent-lighter: #c3b2cc;
  --color-border: #ddd0e2;
  --color-success: #3f7a4f;
  --color-error: #b3392c;
  --color-star: #d99a1b;
  --color-overlay: rgba(30, 22, 36, 0.5);

  /* Typography */
  --font-base: 'Alexandria', Arial, sans-serif;
  --font-display: 'Alexandria', Arial, sans-serif;
  --fs-h1: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem);
  --fs-h2: clamp(1.45rem, 1.2rem + 1.1vw, 1.85rem);
  --fs-h3: 1.25rem;
  --fs-body: 0.95rem;
  --fs-small: 0.8125rem;

  /* Layout */
  --content-max: 1280px;
  --space-section: 64px;
  --space-section-mobile: 36px;
  --header-height: 108px;
  --header-height-mobile: 80px;
  --announcement-height: 40px;
  --announcement-height-mobile: 36px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 14px rgba(43, 34, 32, 0.07);
  --transition-fast: 180ms ease;
  --transition-base: 280ms ease;

  --drawer-width: min(400px, 88vw);

  /* Spacing scale — use these for any new margin/padding/gap so future
     components stay on-grid. Existing off-scale values (14px/18px/20px/etc.)
     are intentional prior sizing, left as-is rather than nudged onto the
     scale, since that would be a visual change, not just a token rename. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
}

/* Breakpoint convention — every @media in this file uses one of these 7
   values. New CSS should reuse one of these rather than introducing an 8th.
   (CSS custom properties can't be referenced inside @media conditions in
   any shipping browser, so this is documented here rather than tokenized.)
   600 · 700 · 768 · 900 · 1024 · 1100 · 1200 */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; line-height: 1.3; }
h1, h2 { font-family: var(--font-display); }
[dir="ltr"] { --font-base: 'Manrope', Arial, sans-serif; --font-display: 'Cormorant Garamond', Georgia, serif; }
.btn, .filter-chip, .lang-toggle, .product-name-ar { font-weight: 600; }

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

.section {
  padding-block: var(--space-section-mobile);
}
@media (min-width: 1024px) {
  .section { padding-block: var(--space-section); }
}

.section-heading {
  text-align: center;
  margin-bottom: 20px;
}
.section-heading h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
}
.section-heading p {
  color: var(--color-text-muted);
  margin-top: 6px;
  font-size: var(--fs-body);
}
@media (min-width: 1024px) { .section-heading { margin-bottom: 28px; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 46px;
  padding-inline: var(--space-5);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--fs-body);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-primary:disabled { background: var(--color-border); color: var(--color-text-muted); cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--color-accent); border-color: var(--color-accent); }
.btn-outline:hover { background: var(--color-accent-light); }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding-inline: var(--space-4); font-size: var(--fs-small); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Honeypot field — clipped to nothing in place (not shifted off-screen,
   which would otherwise expand the page's scrollable width) and paired
   with aria-hidden + tabindex="-1" on the input so real (sighted and
   screen-reader) users never see or reach it. Simple scripted spam bots
   that blindly fill every form field still fill this one, so the submit
   handler can silently ignore the submission. */
.hp-field {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 8px; top: -60px;
  background: var(--color-accent); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); z-index: 1000; transition: top var(--transition-fast);
}
.skip-link:focus { top: 8px; }

/* Focus visibility (a11y, kept even though it's not in the reference) */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Announcement bar ----------
   A soft, continuously-sliding strip (same mechanic as the marquee lower
   on the page) rather than a fading rotator, so the motion reads as one
   elegant, slow ribbon instead of a jump-cut. */
.announcement-bar {
  height: var(--announcement-height-mobile);
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
@media (min-width: 768px) { .announcement-bar { height: var(--announcement-height); } }
.announcement-track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  gap: var(--space-7);
  animation: marquee-ltr 32s linear infinite;
  padding-inline-start: 48px;
}
[dir="rtl"] .announcement-track { animation-name: marquee-rtl; }
.announcement-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
}
.announcement-item a { text-decoration: underline; font-weight: 700; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .announcement-track { animation: none; }
}

/* ---------- Header ----------
   Homepage: starts absolutely positioned, transparent, directly over the
   hero (top offset = announcement bar height, so the hero begins right
   below the announcement bar and the header floats on top of it — see
   initHeaderHeroScroll() in script.js, which adds .has-hero only when a
   .hero element exists on the page, and toggles .header-pinned once the
   user scrolls past the announcement bar). Inner pages (no .hero) never
   get .has-hero, so they keep a plain solid sticky header throughout. */
.site-header {
  position: absolute;
  top: var(--announcement-height-mobile);
  inset-inline: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  height: var(--header-height-mobile);
  transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-base), backdrop-filter var(--transition-base);
}
@media (min-width: 768px) { .site-header { top: var(--announcement-height); } }
@media (min-width: 1024px) { .site-header { height: var(--header-height); } }
.site-header.header-hidden { transform: translateY(-100%); }

.site-header:not(.has-hero) {
  position: sticky;
  top: 0;
  background: var(--color-surface);
  border-bottom-color: var(--color-border);
}

.site-header.has-hero.header-pinned {
  position: fixed;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--color-border);
}

/* Transparent-over-hero state: light icons/text with a soft shadow for
   legibility instead of a heavy box, per brief — no baked-in background. */
.site-header.has-hero:not(.header-pinned) .header-icon-btn,
.site-header.has-hero:not(.header-pinned) .header-nav a,
.site-header.has-hero:not(.header-pinned) .lang-toggle {
  color: #fff;
  filter: drop-shadow(0 1px 5px rgba(20,10,26,0.4));
}
.site-header.has-hero:not(.header-pinned) .header-icon-btn:hover,
.site-header.has-hero:not(.header-pinned) .lang-toggle:hover {
  background: rgba(255,255,255,0.18);
}
.site-header.has-hero:not(.header-pinned) .lang-toggle { border-color: rgba(255,255,255,0.55); }
.site-header.has-hero:not(.header-pinned) .cart-count { background: #fff; color: var(--color-accent-dark); }
/* Header logo floating over the hero photo only — turned pure white via
   filter (same artwork/shape, no new asset), with a barely-there shadow
   for legibility. Every other instance of the logo (pinned header,
   footer, drawers, PDP, welcome screen) is untouched since this selector
   only matches the transparent-over-hero, pre-scroll state. */
.site-header.has-hero:not(.header-pinned) .logo img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 4px rgba(20,10,26,0.35));
  /* ~8% smaller than the normal 100px/140px logo for better visual
     balance against the hero photo — position/centering unchanged, and
     every other instance of the logo keeps its normal size. */
  width: 92px;
}
@media (min-width: 1024px) {
  .site-header.has-hero:not(.header-pinned) .logo img { width: 129px; }
}
.site-header.has-hero:not(.header-pinned) .logo-text {
  color: #fff;
  filter: drop-shadow(0 1px 4px rgba(20,10,26,0.35));
}
.site-header.has-hero:not(.header-pinned) .header-nav a:hover,
.site-header.has-hero:not(.header-pinned) .header-nav a.is-active { border-color: #fff; }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  gap: var(--space-3);
}
.header-zone { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-zone-start { grid-column: 1; justify-content: flex-start; }
.header-zone-end { grid-column: 3; justify-content: flex-end; }
/* Logo is centered independent of how wide the start/end zones are —
   true optical centering, not just space-between. */
.logo.header-zone-center { grid-column: 2; justify-self: center; }

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--color-text);
  position: relative;
  transition: background var(--transition-fast);
}
.header-icon-btn:hover { background: var(--color-accent-light); }
.header-icon-btn svg { width: 22px; height: 22px; }

.cart-count {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.cart-count[hidden] { display: none; }

.logo {
  display: inline-flex;
  align-items: center;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-accent-dark);
  position: relative;
  padding-inline-end: 0.14em;
}
/* Real logo is a wide horizontal wordmark (~2.3 width:height), not a
   vertical lockup — sized by width so it reads clearly without forcing
   the header to grow taller. See ASSET_REPLACEMENT_GUIDE.md. */
.logo img { width: 100px; height: auto; max-width: none; object-fit: contain; background: transparent; }
@media (min-width: 1024px) { .logo img { width: 140px; } }
/* Mobile drawer header is compact — scale the mark down to fit. */
.logo-drawer img { width: 100px; }
/* Footer mark stays modest and unobtrusive — a signature, not a headline. */
.logo-footer { margin-bottom: 6px; }
.logo-footer img { width: 90px; }

.header-nav {
  display: none;
}
@media (min-width: 1024px) {
  .header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
  }
  .header-nav a {
    font-size: var(--fs-body);
    font-weight: 600;
    padding-block: 6px;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition-fast), color var(--transition-fast);
  }
  .header-nav a:hover,
  .header-nav a.is-active { border-color: var(--color-accent); color: var(--color-accent); }
}

.header-side {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  height: 36px;
  padding-inline: 14px;
  background: transparent;
  color: var(--color-text);
  font-size: var(--fs-small);
  font-weight: 600;
  transition: background var(--transition-fast);
}
.lang-toggle:hover { background: var(--color-accent-light); }
.lang-toggle svg { flex-shrink: 0; opacity: 0.8; }

.menu-toggle { display: inline-flex; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.header-nav-desktop-only { display: none; }
@media (min-width:1024px) { .header-nav-desktop-only { display: inline-flex; } }

/* Dropdown */
.nav-item-dropdown { position: relative; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  min-width: 220px;
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}
.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  font-weight: 500 !important;
  border: none !important;
}
.nav-dropdown a:hover { background: var(--color-accent-light); }

/* ---------- Intro screen ----------
   Minimal luxury-opener: mostly white, a very soft lavender tint only
   near the outer edges, logo only, no visible button/copy — the whole
   screen is the control. */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 50% 50%, #ffffff 0%, #ffffff 60%, #f4f0f6 90%, #e5d9ea 100%);
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}
/* No focus outline here — it rendered as an unwanted frame around the
   whole screen (this element auto-focuses on load in initIntro()). The
   sitewide focus-visible rule still applies to every other focusable
   element, unchanged. */
.intro-screen:focus-visible { outline: none; }
.intro-screen.is-dismissed { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-5);
}
.intro-logo {
  width: min(56vw, 280px);
  height: auto;
  opacity: 0;
  transform: translateY(6px);
  animation: intro-logo-reveal 800ms cubic-bezier(0.22, 1, 0.36, 1) 120ms forwards;
}
@keyframes intro-logo-reveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-logo { animation: none; opacity: 1; transform: none; }
  .intro-screen { transition: opacity 1ms linear; }
}

/* ---------- Overlay + Drawers ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  z-index: 150;
}
.overlay.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: var(--drawer-width);
  background: var(--color-surface);
  z-index: 160;
  transform: translateX(-105%);
  transition: transform var(--transition-base);
  display: flex;
  flex-direction: column;
}
[dir="rtl"] .drawer { transform: translateX(105%); }
.drawer.is-open { transform: translateX(0); }
.drawer-cart, .drawer-search { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(105%); }
[dir="rtl"] .drawer-cart, [dir="rtl"] .drawer-search { transform: translateX(-105%); }
.drawer-cart.is-open, .drawer-search.is-open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
}
.drawer-header h2 { font-size: 1.1rem; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer { padding: 20px; border-top: 1px solid var(--color-border); }

.close-btn {
  width: 36px; height: 36px;
  border: none; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--color-text);
}
.close-btn:hover { background: var(--color-accent-light); }

/* Mobile nav drawer content */
.mobile-nav-list a {
  display: block;
  padding: 12px 4px;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav-sub { padding-inline-start: 16px; }
[dir="rtl"] .mobile-nav-sub { padding-inline-start: 0; padding-inline-end: 16px; }
.mobile-nav-sub a { font-weight: 500; font-size: var(--fs-small); color: var(--color-text-muted); }
.mobile-social-row {
  display: flex;
  gap: var(--space-3);
  margin-top: 20px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-accent-light);
}
@media (min-width: 768px) {
  .hero { aspect-ratio: 21 / 9; }
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img, .hero-media video {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  position: absolute; inset: 0;
}
.hero-media video { opacity: 0; transition: opacity var(--transition-base); }
.hero-media video.is-ready { opacity: 1; }
.hero-media .hero-poster-mobile { display: block; }
.hero-media .hero-poster-desktop { display: none; }
@media (min-width: 768px) {
  .hero-media .hero-poster-mobile { display: none; }
  .hero-media .hero-poster-desktop { display: block; }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(30,20,34,0.4), rgba(30,20,34,0.06));
  display: flex; align-items: flex-end; justify-content: center;
  text-align: center; padding: 32px 20px;
}
.hero-content { color: #fff; max-width: 560px; }
.hero-content h1 { font-size: var(--fs-h1); font-weight: 800; margin-bottom: 10px; text-shadow: 0 2px 12px rgba(0,0,0,0.25); }
.hero-content p { margin-bottom: 18px; opacity: 0.95; }

/* ---------- Carousels (product / trending / customers / stories) ---------- */
.carousel-wrap { position: relative; }
.carousel-track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }

.carousel-nav {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
@media (min-width: 900px) { .carousel-nav { display: inline-flex; } }
.carousel-nav:hover { background: var(--color-accent-light); }
.carousel-nav.prev { inset-inline-start: -8px; }
.carousel-nav.next { inset-inline-end: -8px; }
[dir="rtl"] .carousel-nav svg { transform: scaleX(-1); }
.carousel-nav[disabled] { opacity: 0.3; cursor: default; }

.view-all-link {
  display: block;
  text-align: center;
  margin-top: var(--space-5);
  font-weight: 700;
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  width: fit-content;
  margin-inline: auto;
  padding-bottom: 2px;
}

/* ---------- Product Card ---------- */
.product-card {
  scroll-snap-align: start;
  flex: 0 0 72%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 600px) { .product-card { flex-basis: 46%; } }
@media (min-width: 900px) { .product-card { flex-basis: 30%; } }
@media (min-width: 1200px) { .product-card { flex-basis: 22.4%; } }

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-accent-light);
}
.product-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity var(--transition-base), transform 420ms ease;
}
.product-media .img-main { transform: scale(1); }
.product-card:hover .img-main { transform: scale(1.045); }
.product-media .img-hover { opacity: 0; }
.product-card:hover .img-hover { opacity: 1; }
.product-badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--color-accent); color: #fff;
  font-size: var(--fs-small); font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.product-badge.sold-out { background: var(--color-text-muted); }

.product-info { padding: 14px; display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.product-rating { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--color-text-muted); margin-block: 2px; }
.product-rating .stars { color: var(--color-star); letter-spacing: 1px; }
.product-rating .rating-count { font-weight: 600; }
.product-rating-empty { color: var(--color-text-muted); font-size: var(--fs-small); margin-top: 2px; }
.product-name-ar { font-weight: 700; font-size: 0.98rem; }
.product-name-en { font-size: var(--fs-small); color: var(--color-text-muted); }
.product-price-row { display: flex; align-items: baseline; gap: var(--space-2); }
.price-current { font-weight: 800; color: var(--color-accent); }
.price-old { text-decoration: line-through; color: var(--color-text-muted); font-weight: 600; margin-inline-end: 6px; }
.price-unavailable { font-weight: 600; color: var(--color-text-muted); font-size: var(--fs-small); }

.qty-row { display: flex; align-items: center; gap: 0; border: 1px solid var(--color-border); border-radius: var(--radius-pill); width: fit-content; }
.qty-btn { width: 30px; height: 30px; background: transparent; border: none; display: flex; align-items: center; justify-content: center; color: var(--color-text); border-radius: 50%; transition: background var(--transition-fast), color var(--transition-fast); }
.qty-btn:hover { color: var(--color-accent); background: var(--color-accent-light); }
.qty-btn svg { display: block; }
.qty-value { width: 26px; text-align: center; font-weight: 700; font-size: var(--fs-small); }

.product-actions { margin-top: auto; display: flex; gap: var(--space-2); }
.add-to-cart-btn { flex: 1; }
.quick-shop-btn { flex: 0 0 auto; }

/* ---------- Before/After ---------- */
.ba-card {
  scroll-snap-align: center;
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 10px 10px 18px;
  /* Scroll-in reveal — see initScrollReveal() in script.js. */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 560ms ease, transform 560ms ease;
}
.ba-card.is-revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .ba-card { transition: none; }
}
@media (min-width: 700px) { .ba-card { flex-basis: 46%; } }
@media (min-width: 1100px) { .ba-card { flex-basis: 30%; } }

.ba-compare {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  background: var(--color-accent-light);
}
.ba-compare img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}
.ba-after-wrap {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 50%);
}
[dir="rtl"] .ba-after-wrap { clip-path: inset(0 50% 0 0); }
.ba-handle {
  position: absolute; top: 0; bottom: 0;
  inset-inline-start: 50%;
  width: 3px; background: #fff;
  transform: translateX(-50%);
  cursor: grab;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.16));
}
.ba-compare.is-dragging .ba-handle { cursor: grabbing; }
.ba-handle-btn {
  position: absolute; top: 50%; inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: none;
  display: flex; align-items: center; justify-content: center; gap: -2px;
  color: var(--color-accent-dark);
  box-shadow: var(--shadow-card);
  cursor: grab;
}
.ba-compare.is-dragging .ba-handle-btn { cursor: grabbing; }
.ba-handle-icon { display: flex; margin-inline: -3px; }
.ba-handle-icon.rotate-180 { transform: rotate(180deg); }
.ba-label {
  position: absolute; top: 10px;
  background: rgba(42,34,48,0.68); color: #fff;
  font-size: var(--fs-small); font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.ba-label.before { inset-inline-start: 10px; }
.ba-label.after { inset-inline-end: 10px; }
/* Caption block below each before/after card — flex:1 + the button's
   margin-top:auto keeps every card's "Shop Product" button aligned to the
   same baseline even when captions run to different lengths. */
.ba-caption {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: var(--space-3);
  padding-inline: var(--space-2);
}
.ba-product-name { font-weight: 700; font-size: var(--fs-body); }
.ba-caption-text {
  margin-top: 6px;
  margin-bottom: 14px;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  line-height: 1.65;
  max-width: 36ch;
  overflow-wrap: break-word;
}
.ba-shop-btn { margin-top: auto; }
.ba-note { margin-top: 22px; text-align: center; font-size: var(--fs-small); color: var(--color-text-muted); }

.stories-placeholder {
  max-width: 460px;
  margin-inline: auto;
  text-align: center;
  padding-block: 20px 8px;
}
.stories-placeholder-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--color-surface); color: var(--color-accent-dark);
  box-shadow: inset 0 0 0 1px var(--color-border);
  margin-bottom: 14px;
}
.stories-placeholder h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; }
.stories-placeholder p { margin-top: var(--space-2); color: var(--color-text-muted); font-size: var(--fs-small); line-height: 1.7; }

/* ---------- Bella daily routine ---------- */
.routine-steps {
  margin-top: var(--space-2);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 768px) {
  .routine-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.routine-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding-top: var(--space-2);
}
.routine-step-number {
  position: absolute; top: -8px; inset-inline-start: calc(50% + 70px);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--color-accent); color: #fff;
  font-size: var(--fs-small); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 767px) { .routine-step-number { inset-inline-start: calc(50% + 76px); } }
.routine-step-img {
  width: 140px; height: 140px; object-fit: contain;
  background: var(--color-accent-light);
  border-radius: 50%;
  padding: 18px;
}
.routine-step-label {
  margin-top: 10px;
  font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.02em;
  color: var(--color-accent-dark); text-transform: uppercase;
}
.routine-step-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-top: 2px; }
.routine-step-desc { color: var(--color-text-muted); font-size: var(--fs-small); line-height: 1.65; max-width: 30ch; }
.routine-step-link { margin-top: var(--space-1); font-size: var(--fs-small); font-weight: 600; color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Model feature (lavender portrait) ----------
   Full-bleed edge-to-edge band between the routine explainer and the
   products section. Whole image shown uncropped at its natural aspect
   ratio — no fixed/viewport height, no object-fit — so the face, scarf,
   and shoulders are always fully in frame. */
.bella-model-feature,
.bella-alpha-arbutin,
.bella-alpha-arbutin picture {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ---------- Alpha Arbutin section ----------
   Full-bleed picture band; desktop/tablet load the wide crop, mobile
   loads the tall crop — never both. Whole artwork shown uncropped at
   its natural aspect ratio so every Arabic line stays readable.
   Positioned (2026-07-16) between the products section/"View all" and
   Before & After — background is the page's own --color-bg (plain white,
   same as the sections on both sides) so the padding-block below reads
   as premium breathing space, not a differently-colored strip. Uses
   padding (not margin) so there's no margin-collapse risk against the
   sections immediately above/below. */
.bella-alpha-arbutin {
  background: var(--color-bg);
  padding-block: 48px;
}
@media (min-width: 768px) {
  .bella-alpha-arbutin { padding-block: 72px; }
}
@media (min-width: 1024px) {
  .bella-alpha-arbutin { padding-block: 96px; }
}

.bella-model-feature img,
.bella-alpha-arbutin img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
}

/* The floral banner and the badge icons below it read as one visual unit,
   so the touching sides of their two sections are pulled in tight — only
   these two, every other section keeps the normal .section rhythm. */
.nature-floral-section { padding-bottom: var(--space-2); }
.nature-graphic-section { padding-top: var(--space-2); }

/* ---------- Vegan/cruelty-free/sustainable badge icons ----------
   Owner-supplied graphic (badges baked into the image), shown whole and
   uncropped, in a compact centered card rather than full-bleed so it
   doesn't dominate the page. */
.nature-graphic-wrap {
  max-width: 340px;
  margin-inline: auto;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
.nature-graphic-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Owner-supplied purple floral/skincare image shown just above the nature
   graphic — shown in full, uncropped, no card frame/shadow/tint, so it
   reads as a plain image sitting directly on the page's white background. */
.nature-floral-wrap {
  max-width: 340px;
  margin-inline: auto;
}
.nature-floral-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ---------- Lifestyle atmosphere banner ----------
   Same slot/role as the original design used for this section — a wide
   decorative photo band. Aspect ratio tuned less extreme than the very
   first version (21/8) so the current portrait photo's face stays fully
   in frame rather than cropping down to just an eyebrow. */
.values-image { width: 100%; aspect-ratio: 4/5; overflow: hidden; }
@media (min-width: 768px) { .values-image { aspect-ratio: 16/9; } }
.values-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--color-accent-light);
  overflow: hidden;
  padding-block: 14px;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-ltr 22s linear infinite;
  gap: 40px;
}
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
.marquee-track span {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-accent-dark);
  white-space: nowrap;
}
@keyframes marquee-ltr { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Newsletter ---------- */
.newsletter { background: var(--color-accent); color: #fff; text-align: center; }
.newsletter h2 { font-size: var(--fs-h2); font-weight: 800; margin-bottom: var(--space-2); }
.newsletter p { opacity: 0.9; margin-bottom: 20px; }
.newsletter-form { display: flex; max-width: 440px; margin-inline: auto; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 220px;
  height: 46px; border-radius: var(--radius-pill); border: none;
  padding-inline: 18px; font-size: var(--fs-body);
}
.newsletter-msg { margin-top: var(--space-3); font-size: var(--fs-small); min-height: 18px; }
.newsletter-msg.success { color: #d9f5e0; }
.newsletter-msg.error { color: #ffd7d0; }

/* ---------- Footer ----------
   Rich, saturated purple gradient in the same hue family as
   --color-accent/--color-accent-dark (not a disconnected grey-purple) —
   deep enough for strong white-text contrast, never black or muddy. */
.site-footer { background: linear-gradient(165deg, #3a2748 0%, #5c3f70 100%); color: #f6effa; padding-block: var(--space-section-mobile); }
.footer-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h3 { font-size: var(--fs-body); font-weight: 700; margin-bottom: 14px; color: #fff; }
.footer-col p { color: #e4d7ec; font-size: var(--fs-small); line-height: 1.75; max-width: 32ch; }
.footer-col ul li { margin-bottom: var(--space-2); }
.footer-col a { font-size: var(--fs-small); color: #ecdff3; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 34px;
  box-shadow: 0 2px 6px rgba(20,10,26,0.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
/* Real brand icon shapes in their official colors (Instagram gradient,
   WhatsApp green, Snapchat yellow/black, TikTok multicolor, Email orange),
   each centered inside its own solid white circular button. */
.footer-social a svg { width: 16px; height: 16px; display: block; }
.footer-social a:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(20,10,26,0.28); }
.footer-bottom {
  margin-top: var(--space-6); padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.16);
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  align-items: center; justify-content: space-between;
  font-size: var(--fs-small); color: #dccbe6;
}
.footer-owner-credit {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  font-size: 13px; font-weight: 700;
  color: #f7f0fa;
  opacity: 0.95;
  letter-spacing: 0.02em;
}
/* Separate small signature line, tucked into the corner opposite the fixed
   back-to-top button (which sits at inset-inline-end) so the two never
   overlap regardless of page length or language direction. Kept clearly
   more muted than .footer-owner-credit so the owner stays more prominent. */
.footer-designer-signature {
  margin-top: var(--space-2);
  padding-inline: 20px;
  text-align: start;
  font-size: 10.5px;
  font-weight: 400;
  color: #dccbe6;
  opacity: 0.5;
  letter-spacing: 0.02em;
}

/* ---------- Back to top ----------
   Fixed to the viewport corner (not part of the footer's own layout), so
   it can never sit on top of the footer's social icon row. */
.back-to-top {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 60;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-accent-dark);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-accent-light); }
.back-to-top svg { transform: rotate(-90deg); }
@media (max-width: 600px) { .back-to-top { inset-block-end: 16px; inset-inline-end: 16px; width: 36px; height: 36px; } }

/* ---------- Generic page hero (about/contact/legal) ---------- */
.page-hero { text-align: center; padding-block: 40px; background: var(--color-surface-alt); }
.page-hero h1 { font-size: var(--fs-h1); font-weight: 800; }
.legal-content { max-width: 760px; margin-inline: auto; }
.legal-content h2 { font-size: 1.1rem; margin-top: 28px; margin-bottom: 10px; }
.legal-content p, .legal-content li { color: var(--color-text-muted); margin-bottom: 10px; }
.legal-content ul { list-style: disc; padding-inline-start: 20px; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 20px;
  display: flex; align-items: center; gap: 14px;
}
.contact-card .header-icon-btn { background: var(--color-accent-light); }
.contact-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.contact-form label { font-size: var(--fs-small); font-weight: 700; margin-bottom: var(--space-1); display: block; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 12px 14px; font: inherit; font-size: 16px; background: var(--color-surface); color: var(--color-text);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.tracking-panel { max-width: 640px; }
.tracking-panel > p { color: var(--color-text-muted); margin-bottom: 22px; }
.tracking-form { margin-bottom: 18px; }
.tracking-form :disabled { cursor: not-allowed; opacity: 0.65; }

/* ---------- Order tracking timeline ----------
   Informational only — every stage renders identically (no "active" state)
   since Bella has no live tracking backend yet and must never fake a
   current status. */
.tracking-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: 0;
  list-style: none;
}
/* Higher specificity than the plain `.tracking-timeline { display: flex }`
   above (attribute selector + class beats a lone class of equal source
   order), so the standard `hidden` attribute actually hides this element —
   without this, the author-stylesheet `display: flex` wins the cascade tie
   against the UA stylesheet's `[hidden] { display: none }`. */
.tracking-timeline[hidden] { display: none; }
@media (min-width: 700px) {
  .tracking-timeline { flex-direction: row; gap: var(--space-2); }
}
.tracking-timeline li { display: flex; align-items: center; gap: 10px; flex: 1; }
@media (min-width: 700px) {
  .tracking-timeline li { flex-direction: column; text-align: center; gap: var(--space-2); }
}
.tracking-timeline-icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-small); font-weight: 700;
}
.tracking-timeline-label { font-size: var(--fs-small); color: var(--color-text-muted); font-weight: 600; }
.tracking-timeline li.is-complete .tracking-timeline-icon,
.tracking-timeline li.is-active .tracking-timeline-icon {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.tracking-timeline li.is-active .tracking-timeline-label { color: var(--color-text); font-weight: 700; }
.tracking-notice { color: var(--color-text-muted); font-size: var(--fs-small); line-height: 1.7; margin-bottom: 22px; padding: 12px 14px; background: var(--color-surface-alt); border-radius: var(--radius-sm); }

/* ---------- Checkout ----------
   Real order summary + customer/shipping/billing/payment forms. "Place
   Order" creates a real order in Supabase and shows a success panel;
   WhatsApp is a separate, optional action on that panel only — see
   initCheckoutForm() in script.js. */
.checkout-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; align-items: start; margin-top: 20px; }
.checkout-grid[hidden] { display: none; }
@media (min-width: 900px) { .checkout-grid { grid-template-columns: 1.4fr 1fr; } }
.checkout-form-col { display: flex; flex-direction: column; gap: 20px; }
.checkout-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.checkout-block h2 { font-size: 1.05rem; font-weight: 700; }
.checkout-block label:not(.checkout-checkbox-row) { font-size: var(--fs-small); font-weight: 700; margin-bottom: var(--space-1); display: block; }
.checkout-block input[type="text"], .checkout-block input[type="tel"], .checkout-block input[type="email"], .checkout-block select {
  width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  /* 16px, not var(--fs-body) (15.2px) -- anything smaller makes iOS Safari
     zoom the whole page in on focus, a jarring mobile-only surprise. */
  padding: 12px 14px; font: inherit; font-size: 16px; background: var(--color-surface); color: var(--color-text);
}
.checkout-field-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 480px) { .checkout-field-row { grid-template-columns: 1fr 1fr; } }
.checkout-block-hint { font-size: var(--fs-small); color: var(--color-text-muted); margin-bottom: var(--space-3); margin-top: -6px; }
.checkout-checkbox-row { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-small); font-weight: 600; cursor: pointer; }
.checkout-checkbox-row input { width: 16px; height: 16px; accent-color: var(--color-accent); }
.checkout-payment-option {
  display: flex; align-items: center; gap: var(--space-3);
  border: 1.5px solid var(--color-accent); border-radius: var(--radius-sm);
  padding: var(--space-4); cursor: pointer; background: var(--color-accent-light);
}
.checkout-payment-option input { width: 18px; height: 18px; accent-color: var(--color-accent); flex-shrink: 0; }
.checkout-payment-option-icon { color: var(--color-accent-dark); flex-shrink: 0; }
.checkout-payment-option-text { display: flex; flex-direction: column; gap: 2px; }
.checkout-payment-option-text strong { font-size: var(--fs-body); }
.checkout-payment-option-text small { color: var(--color-text-muted); font-size: var(--fs-small); }
/* Payment methods — a small icon row at the very bottom of the footer,
   below the copyright/owner/designer lines (last thing on the page).
   Part of FOOTER_BLOCK in dev/build-pages.mjs + the matching markup in
   index.html, so it's never duplicated. Informational only: nothing here
   is clickable/functional — see checkout.html for the real WhatsApp
   ordering flow. Each mark sits in a small white chip so its official
   color stays legible against the dark footer background. */
.footer-payment-wrap {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}
.footer-payment-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--space-2); list-style: none; padding: 0; margin: 0;
}
/* Brand wordmarks always read left-to-right, regardless of page direction
   (same fixed-language rule already used for .pdp-title-ar/-en). */
.pay-logo {
  display: inline-flex; align-items: center; gap: 2px;
  direction: ltr;
  height: 14px;
  background: #fff;
  border-radius: 3px;
  padding: 4px 6px;
  font-weight: 800;
  font-size: 0.62rem;
  line-height: 1;
}
.pay-logo-visa { color: #1a1f71; font-style: italic; font-family: Arial, Helvetica, sans-serif; letter-spacing: 0.01em; }
.pay-logo-mastercard { padding-inline: var(--space-1); }
.pay-logo-mastercard svg { display: block; }
.pay-logo-amex { background: #2e77bb; color: #fff; letter-spacing: 0.02em; font-family: Arial, Helvetica, sans-serif; }
.pay-logo-paypal { font-family: Arial, Helvetica, sans-serif; }
.pay-logo-paypal span:first-child { color: #003087; }
.pay-logo-paypal-accent { color: #009cde; }
.pay-logo-applepay { color: #000; font-family: Arial, Helvetica, sans-serif; }
.pay-logo-g { color: #4285f4; font-family: Arial, Helvetica, sans-serif; }
.pay-logo-pay-grey { color: #5f6368; font-family: Arial, Helvetica, sans-serif; }
.pay-logo-union { color: #003a70; font-family: Arial, Helvetica, sans-serif; }
.pay-logo-pay-red { color: #e21836; font-family: Arial, Helvetica, sans-serif; }
.checkout-summary-card {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.checkout-summary-card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: var(--space-3); }
.checkout-summary-card .cart-item { padding-block: var(--space-3); }
.checkout-summary-row { display: flex; justify-content: space-between; font-size: var(--fs-small); color: var(--color-text-muted); padding-block: var(--space-2); border-top: 1px solid var(--color-border); }
.checkout-summary-total { font-weight: 800; color: var(--color-text); font-size: var(--fs-body); }

/* ---------- Checkout success panel ---------- */
.checkout-success {
  max-width: 480px;
  margin-inline: auto;
  margin-top: var(--space-6);
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: var(--space-6) var(--space-5);
}
.checkout-success-icon {
  width: 56px; height: 56px; margin-inline: auto; margin-bottom: var(--space-4);
  border-radius: 50%; background: var(--color-success); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700;
}
.checkout-success h2 { font-size: var(--fs-h2); font-weight: 800; }
.checkout-success > p { color: var(--color-text-muted); margin-top: var(--space-2); }
.checkout-order-number-row {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: var(--space-3); margin-top: var(--space-5); padding: var(--space-4);
  background: var(--color-surface-alt); border-radius: var(--radius-sm);
}
.checkout-order-number-row strong { font-size: 1.15rem; letter-spacing: 0.02em; }
.checkout-success-actions { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-5); }
@media (max-width: 600px) {
  .checkout-success { padding: var(--space-5) var(--space-4); }
}

/* ---------- Search drawer ---------- */
.search-input-row { display: flex; align-items: center; gap: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-pill); padding-inline: 14px; }
.search-input-row input { border: none; outline: none; flex: 1; height: 44px; background: transparent; font: inherit; color: var(--color-text); }
.search-results { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.search-result-item { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-2); border-radius: var(--radius-sm); }
.search-result-item:hover { background: var(--color-accent-light); }
.search-result-item img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; }
.search-empty, .cart-empty { text-align: center; color: var(--color-text-muted); padding: 30px 10px; }

/* ---------- Cart drawer ---------- */
.cart-item { display: flex; gap: var(--space-3); padding-block: 14px; border-bottom: 1px solid var(--color-border); }
.cart-item img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 700; font-size: var(--fs-small); }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-2); }
.cart-item-remove { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-2); font-size: var(--fs-small); color: var(--color-error); background: none; border: none; }
.cart-item-remove:hover { text-decoration: underline; }
.cart-item-remove svg { flex-shrink: 0; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 20px; inset-inline: 0;
  display: flex; justify-content: center;
  z-index: 200; pointer-events: none;
}
.toast-msg {
  background: var(--color-text); color: #fff;
  padding: 12px 20px; border-radius: var(--radius-pill);
  font-size: var(--fs-small); font-weight: 600;
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  box-shadow: var(--shadow-card);
}
.toast-msg.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Breadcrumb / misc ---------- */
.breadcrumb { font-size: var(--fs-small); color: var(--color-text-muted); margin-bottom: var(--space-4); }
.breadcrumb a:hover { color: var(--color-accent); }

/* ---------- Product page ---------- */
.pdp-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 900px) { .pdp-grid { grid-template-columns: 1fr 1fr; } }
.pdp-gallery-main { aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-accent-light); margin-bottom: 10px; cursor: zoom-in; }
/* contain, not cover — guarantees the full bottle/jar/cap/pump/label is
   always visible, never cropped, regardless of the source image's ratio. */
.pdp-gallery-main img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- PDP image zoom ---------- */
.pdp-zoom-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(20,10,26,0.82);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  cursor: zoom-out;
}
.pdp-zoom-overlay.is-open { opacity: 1; visibility: visible; }
.pdp-zoom-img { max-width: min(92vw, 640px); max-height: 88vh; width: auto; height: auto; border-radius: var(--radius-sm); object-fit: contain; background: #fff; }
.pdp-thumbs { display: flex; gap: 10px; }
.pdp-thumb { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; }
.pdp-thumb.is-active { border-color: var(--color-accent); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Always real Arabic/English product-name text regardless of the UI
   language toggle (script.js sets these from nameAr/nameEn directly), so
   the font pinned to each stays fixed instead of following [dir]. */
.pdp-title-ar { font-family: 'Alexandria', Arial, sans-serif; font-size: var(--fs-h2); font-weight: 800; }
.pdp-title-en { font-family: 'Manrope', Arial, sans-serif; color: var(--color-text-muted); margin-top: 2px; }
.pdp-price-row { display: flex; align-items: baseline; gap: 10px; margin: 14px 0; }
.pdp-price-row .price-current { font-size: 1.4rem; }
.pdp-stock { font-size: var(--fs-small); font-weight: 700; }
.pdp-stock.in { color: var(--color-success); }
.pdp-stock.out { color: var(--color-error); }
.pdp-actions { display: flex; gap: 10px; margin: 18px 0; align-items: center; flex-wrap: wrap; }

/* ---------- PDP delivery info ---------- */
.pdp-delivery-info {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
}
.pdp-delivery-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  display: flex; align-items: center; justify-content: center;
}
.pdp-delivery-text strong { display: block; font-size: var(--fs-small); margin-bottom: var(--space-1); }
.pdp-delivery-text p { color: var(--color-text-muted); font-size: var(--fs-small); line-height: 1.6; margin-bottom: var(--space-2); }
.pdp-delivery-links { display: flex; gap: 14px; flex-wrap: wrap; }
.pdp-delivery-links a { font-size: var(--fs-small); font-weight: 700; color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }

.pdp-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--color-border); margin-top: 20px; flex-wrap: wrap; }
.pdp-tab-btn { background: none; border: none; padding: 10px 14px; font-weight: 700; color: var(--color-text-muted); border-bottom: 2px solid transparent; }
.pdp-tab-btn.is-active { color: var(--color-accent); border-color: var(--color-accent); }
.pdp-tab-panel { padding: 16px 4px; display: none; color: var(--color-text-muted); }
.pdp-tab-panel.is-active { display: block; }
.pdp-tab-panel ul { list-style: disc; padding-inline-start: 20px; }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-q { width: 100%; text-align: start; background: none; border: none; padding: 14px 0; font-weight: 700; display: flex; justify-content: space-between; }
.faq-a { padding-bottom: 14px; color: var(--color-text-muted); display: none; }
.faq-item.is-open .faq-a { display: block; }
.review-item { border-bottom: 1px solid var(--color-border); padding-block: 14px; }
.review-name { font-weight: 700; font-size: var(--fs-small); }

/* ---------- Grid pages (shop all) ---------- */
.filter-bar {
  display: flex; gap: var(--space-2); margin-bottom: 20px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  padding: 6px 15px; height: 34px;
  font-size: var(--fs-small); font-weight: 600; color: var(--color-text-muted);
  background: var(--color-surface); transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.filter-chip:hover { border-color: var(--color-accent); color: var(--color-accent); }
.filter-chip.is-active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.product-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
.product-grid .product-card { flex-basis: auto; }

/* ---------- Promo strip (CMS-managed, renderPromoStrip() in script.js) ----------
   A single static bar for the top active promotion — deliberately not the
   sliding-marquee treatment used by .announcement-bar above, so the two are
   visually distinct and a promotion doesn't read as a permanent site message. */
.promo-strip {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  text-align: center;
  padding: 10px 16px;
  font-size: var(--fs-small);
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
}
.promo-strip strong { font-weight: 700; }

/* ---------- Advertisements section (CMS-managed, renderAdvertisements() in script.js) ----------
   Card grid, same visual weight as .ba-card, reusing the existing card/shadow/
   radius tokens rather than introducing a new card style. */
.ads-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ad-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ad-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ad-card-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.ad-card-body h3 { margin: 0; font-size: var(--fs-h3); }
.ad-card-body p { margin: 0; color: var(--color-text-muted); font-size: var(--fs-small); flex: 1; }
