/* ---------- CSS Custom Properties ---------- */
/* Color tokens (--color-bg, --color-text, --color-accent, etc.) are defined
   from store settings in layout.jinja <style> on :root and [data-theme="dark"]. */
:root {
  --color-error: #c53030;
  --color-success: #38a169;

  --font-primary: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Inter", "Helvetica Neue", Arial, sans-serif;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --fs-xs: 0.6875rem; /* 11px */
  --fs-sm: 0.75rem; /* 12px */
  --fs-base: 0.875rem; /* 14px */
  --fs-md: 1rem; /* 16px */
  --fs-lg: 1.125rem; /* 18px */
  --fs-xl: 1.25rem; /* 20px */
  --fs-2xl: 1.5rem; /* 24px */
  --fs-3xl: 2rem; /* 32px */
  --fs-4xl: 2.5rem; /* 40px */
  --fs-hero: 3.5rem; /* 56px */

  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;

  --container-max: 1800px;
  --container-padding: 2.5rem;

  --header-height: 70px;
  --announcement-height: 0px;

  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-full: 0;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  --z-header: 100;
  --z-overlay: 200;
  --z-drawer: 300;
  --z-modal: 400;
}

[dir="rtl"] {
  --font-primary: "Cairo", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Cairo", "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  /* user-select: none; */
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Utility ---------- */
.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-full {
  width: 100%;
  padding: 0;
  margin: 0;
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.main-content {
  flex: 1 0 auto;
  width: 100%;
}

.footer-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.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;
}

/* ============================================
   ANNOUNCEMENT BAR
   ============================================ */
.announcement-bar {
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.marquee-content {
  display: flex;
  white-space: nowrap;
  animation: marquee-scroll 170s linear infinite;
  will-change: transform;
}

.marquee-content:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  padding: 0 4rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.marquee-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

[dir="rtl"] .marquee-content {
  animation: marquee-scroll-rtl 170s linear infinite;
}

@keyframes marquee-scroll-rtl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

.announcement-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-fast);
  padding: 4px;
}

.announcement-close:hover {
  color: var(--color-white);
}

.announcement-bar a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.announcement-bar a:hover {
  opacity: 0.8;
}

/* ---------- Announcement Slider ---------- */
.announcement-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.announcement-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    transform 1s cubic-bezier(0.19, 1, 0.22, 1),
    opacity 0.6s ease,
    visibility 0.6s ease;
  padding: 0 3rem;
  text-align: center;
}

.announcement-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  transform: translate(0, 0);
}

.announcement-slide.is-previous {
  z-index: 1;
}

.announcement-text {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

/* Slide Y Mode */
.slide-y-mode .announcement-slide {
  transform: translateY(100%);
}

.slide-y-mode .announcement-slide.is-active {
  transform: translateY(0);
}

.slide-y-mode .announcement-slide.is-previous {
  transform: translateY(-100%);
}

/* Slide X Mode */
.slide-x-mode .announcement-slide {
  transform: translateX(100%);
}

.slide-x-mode .announcement-slide.is-active {
  transform: translateX(0);
}

.slide-x-mode .announcement-slide.is-previous {
  transform: translateX(-100%);
}

/* RTL Support for Slide X */
[dir="rtl"] .slide-x-mode .announcement-slide {
  transform: translateX(-100%);
}

[dir="rtl"] .slide-x-mode .announcement-slide.is-active {
  transform: translateX(0);
}

[dir="rtl"] .slide-x-mode .announcement-slide.is-previous {
  transform: translateX(100%);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: relative;
  background-color: transparent;
  border-bottom: 0;
  color: var(--color-white-static);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base);
}

.site-header:not(.is-scrolled):not(.header-solid) .nav-link,
.site-header:not(.is-scrolled):not(.header-solid) .header-action-btn,
.site-header:not(.is-scrolled):not(.header-solid) .menu-toggle {
  color: var(--color-white-static);
  opacity: 1;
}

.site-header-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
}

.site-header-wrapper[data-sticky-header="true"] {
  position: fixed;
}

.site-header.is-scrolled {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}

.site-header.is-scrolled nav a:hover,
.site-header.header-solid nav a:hover {
  color: var(--color-text-muted);
}

.site-header.header-solid {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
}

.site-header.header-solid .header-logo svg,
.site-header.header-solid .header-logo img {
  filter: none !important;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-height);
  gap: var(--spacing-xl);
}

/* Header Style 2: Logo - Links - Actions (Desktop Only) */
@media (min-width: 1025px) {
  .header-layout-style_2 .header-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
  }

  .header-layout-style_2 .header-logo {
    order: 1 !important;
    display: flex !important;
    justify-content: flex-start !important;
  }

  .header-layout-style_2 .header-nav-container {
    order: 2 !important;
    display: flex !important;
    justify-content: center !important;
  }

  .header-layout-style_2 .header-actions {
    order: 3 !important;
    display: flex !important;
    justify-content: flex-end !important;
  }
}

/* Hide toolbar on home page */
[data-template="home"] .collection-toolbar,
[data-template="index"] .collection-toolbar {
  display: none !important;
}

.header-inner nav {
  display: flex;
  justify-content: flex-start;
}

/* --- Logo --- */
.header-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
}

.header-logo a:hover {
  color: inherit;
  opacity: 0.8;
}

.header-logo svg,
.header-logo img {
  height: var(--header-logo-height, 40px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition:
    opacity var(--transition-base),
    filter var(--transition-base);
}

[data-theme="dark"] .header-logo .header-logo-img {
  filter: invert(1) brightness(1.5);
}

/* Hide white logo by default if it's on a light background (solid or scrolled) */
.site-header.is-scrolled .logo-white,
.site-header.header-solid .logo-white {
  display: none;
}

/* Hide dark logo by default if it's on a transparent header (not scrolled) */
.site-header:not(.is-scrolled):not(.header-solid) .logo-dark {
  display: none;
}

/* Dark Mode Overrides */
[data-theme="dark"] .site-header.is-scrolled .logo-dark,
[data-theme="dark"] .site-header.header-solid .logo-dark {
  display: none !important;
}

[data-theme="dark"] .site-header.is-scrolled .logo-white,
[data-theme="dark"] .site-header.header-solid .logo-white {
  display: block !important;
}

[data-theme="dark"] .site-header.header-solid .header-logo .header-logo-img,
[data-theme="dark"] .site-header.is-scrolled .header-logo .header-logo-img {
  filter: invert(1) brightness(1.5) !important;
}

/* Fallback for single logo if schema isn't fully populated */
.site-header:not(.is-scrolled):not(.header-solid) .header-logo-img {
  filter: invert(1);
}

/* --- Desktop Navigation --- */
.header-nav-container {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-start;
  height: 100%;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.header-nav > li {
  position: static; /* Required for full-width mega menu */
  height: 100%;
  display: flex;
  align-items: center;
}

.header-nav > li.has-dropdown {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 0.75rem;
  height: 100%;
  color: inherit;
  position: relative;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
  opacity: 1;
  white-space: nowrap;
}

.header-nav:hover > li > .nav-link {
  opacity: 0.6;
}

.header-nav > li:hover > .nav-link {
  opacity: 1;
}

.site-header:not(.is-scrolled):not(.header-solid)
  .header-nav:hover
  > li
  > .nav-link {
  opacity: 0.7;
}

.site-header:not(.is-scrolled):not(.header-solid)
  .header-nav
  > li:hover
  > .nav-link {
  opacity: 1;
}

/* Dropdown arrow */
.nav-arrow {
  width: 10px;
  height: 10px;
  transition: transform var(--transition-fast);
  opacity: 0.5;
}

.header-nav > li:hover .nav-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* --- Simple Dropdown --- */
.header-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  min-width: 220px;
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px var(--color-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  padding: 0.5rem 0;
  border: 1px solid var(--color-border-light);
}

[dir="rtl"] .header-dropdown {
  right: 0;
  left: auto;
}

.has-dropdown:hover .header-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-list {
  display: flex;
  flex-direction: column;
}

.dropdown-item-with-sub {
  position: relative;
}

.dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  font-size: var(--fs-base);
  color: var(--color-text);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
  white-space: nowrap;
}

.dropdown-flyout-arrow {
  opacity: 0.5;
  transition: transform var(--transition-fast);
}

[dir="rtl"] .dropdown-flyout-arrow {
  transform: rotate(180deg);
}

.dropdown-link:hover .dropdown-flyout-arrow {
  opacity: 1;
}

.dropdown-sub-menu {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 220px;
  background: var(--color-card-bg);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  /* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1); */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 110;
  padding: 0.5rem 0;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  border-left: none;
}

[dir="rtl"] .dropdown-sub-menu {
  left: auto;
  right: 100%;
  transform: translateX(10px);
  border-left: 1px solid var(--color-border-light);
  border-right: none;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.dropdown-item-with-sub:hover > .dropdown-sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Allow a nested 3rd-level flyout to escape its parent sub-menu instead of being clipped */
.dropdown-sub-menu:has(.dropdown-item-with-sub) {
  overflow: visible;
}

[dir="ltr"] .dropdown-link {
  text-align: left;
}

.dropdown-link:hover {
  background-color: var(--color-surface);
  color: var(--color-text);
}

/* --- Mega Menu --- */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-card-bg);
  border-top: 2px solid var(--color-text);
  box-shadow: 0 20px 60px var(--color-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  padding: var(--spacing-xl) 0;
  color: var(--color-text);
  pointer-events: none;
}

.header-nav > li:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  z-index: 10;
  pointer-events: auto;
}

.mega-menu-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
  gap: var(--spacing-md);
  align-items: start;
  justify-content: center;
}

.mega-menu-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg) var(--spacing-sm);
  border-radius: 8px;
  transition: background-color var(--transition-base);
  cursor: pointer;
}

.mega-menu-column:hover {
  background-color: var(--color-surface);
}

.mega-menu-image {
  display: block;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface);
  flex-shrink: 0;
  border: 2px solid var(--color-border-light);
  transition:
    border-color var(--transition-base),
    transform var(--transition-base);
}

.mega-menu-column:hover .mega-menu-image {
  border-color: var(--color-text);
  transform: scale(1.05);
}

.mega-menu-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.mega-menu-column:hover .mega-menu-image img {
  transform: scale(1.1);
}

.mega-menu-heading {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.mega-menu-heading:hover {
  color: var(--color-text);
}

.mega-menu-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mega-menu-link {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  display: inline-block;
}

.mega-menu-link:hover {
  color: var(--color-text);
}

[dir="rtl"] .mega-menu-link:hover {
  transform: none;
}

/* --- Category Subheader --- */
.category-subheader {
  background-color: transparent;
  color: var(--color-white-static);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
  height: 50px;
  display: flex;
  align-items: center;
}

.site-header.is-scrolled ~ .category-subheader,
.site-header.header-solid ~ .category-subheader,
.is-scrolled .category-subheader,
.header-solid .category-subheader {
  background-color: var(--color-white);
  color: var(--color-text);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.site-header.is-scrolled ~ .category-subheader .category-link:hover,
.site-header.header-solid ~ .category-subheader .category-link:hover,
.is-scrolled .category-link:hover,
.header-solid .category-link:hover {
  color: var(--color-text-muted);
}

.category-subheader.is-sticky {
  position: sticky;
  top: var(--header-height);
  z-index: calc(var(--z-header) - 1);
}

.site-header.is-scrolled ~ .category-subheader.not-sticky {
  /* Nice disappearance when scrolled */
  opacity: 0;
  visibility: hidden;
  height: 0;
  border-top: 0;
  border-bottom: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-10px);
}

.category-nav {
  display: flex;
  width: 100%;
}

.category-nav.align-start {
  justify-content: flex-start;
}

.category-nav.align-end {
  justify-content: flex-end;
}

.category-nav.align-center {
  justify-content: center;
}

.category-list {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  padding: 0;
  margin: 0;
}

.category-item {
  display: flex;
  align-items: center;
  position: relative;
}

.category-link {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  padding: 0.5rem 0;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 1;
}

.category-list:hover .category-link {
  opacity: 0.4;
}

.category-item:hover .category-link {
  opacity: 1;
}

.category-arrow {
  width: 10px;
  height: 10px;
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.category-item:hover .category-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* --- Category Dropdown --- */
.category-item {
  position: relative;
}

.category-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(10px);
  min-width: 220px;
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 150;
  border: 1px solid var(--color-border-light);
  padding: 0.5rem 0;
}

[dir="rtl"] .category-dropdown {
  left: auto;
  right: 0;
  transform: translateY(10px);
}

.category-item:hover .category-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

[dir="rtl"] .category-item:hover .category-dropdown {
  transform: translateY(0);
}

.category-item::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
}

.category-dropdown .dropdown-list {
  display: flex;
  flex-direction: column;
}

.category-dropdown .dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  font-size: var(--fs-base);
  color: var(--color-text);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
  white-space: nowrap;
  text-transform: none;
  font-weight: var(--fw-regular);
}

.category-dropdown .dropdown-link:hover {
  background-color: var(--color-surface);
  color: var(--color-text);
}

@media (max-width: 1024px) {
  .category-subheader {
    display: none;
  }
}

/* --- Header Actions --- */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-md);
}

.header-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  position: relative;
  color: inherit;
  transition: all var(--transition-base);
}

.header-action-btn:hover {
  color: var(--color-white-static); /* High contrast on dark */
  transform: scale(1.15);
}

.site-header.is-scrolled .header-action-btn:hover,
.site-header.header-solid .header-action-btn:hover {
  color: var(--color-text); /* High contrast on light */
}

.header-action-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  width: 17px;
  height: 17px;
  border-radius: var(--radius-full);
  background-color: var(--primary-color);
  color: var(--text-color-primary-bg);
  font-size: 10px;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- User Account Dropdown --- */
.user-account-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.user-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.user-badge:hover,
.user-account-wrapper.is-active .user-badge {
  transform: scale(1.05);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: all var(--transition-base);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 240px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transform-origin: top right;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  overflow: hidden;
  text-align: left;
}

[dir="rtl"] .user-dropdown {
  right: auto;
  left: 0;
  transform-origin: top left;
  text-align: right;
}

.user-account-wrapper.is-active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-dropdown-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
}

.user-avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 2px;
}

.user-full-name {
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.user-email {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.user-dropdown-menu {
  padding: 0.25rem;
}

.user-dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.75rem;
  font-size: var(--fs-sm);
  color: var(--color-text);
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  border-radius: var(--radius-md);
}

.user-dropdown-menu li a svg {
  opacity: 0.5;
  transition: opacity 0.2s ease;
  width: 16px;
  height: 16px;
}

.user-dropdown-menu li a:hover {
  background: var(--color-surface);
  color: var(--color-text);
  transform: translateX(2px);
}

[dir="rtl"] .user-dropdown-menu li a:hover {
  transform: translateX(-4px);
}

.user-dropdown-menu li a:hover svg {
  opacity: 1;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 0.5rem 0.5rem;
}

.user-dropdown-menu li a.user-logout {
  color: var(--color-error);
}

.user-dropdown-menu li a.user-logout:hover {
  background: rgba(197, 48, 48, 0.08);
}

.user-dropdown-menu li a.user-logout svg {
  color: var(--color-error);
}

@media (max-width: 768px) {
  .user-badge {
    width: 36px;
    height: 36px;
  }
  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  /* Mobile Dropdown Positioning */
  .user-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
    border: none;
    box-shadow: var(--shadow-lg);
  }

  .user-account-wrapper.is-active .user-dropdown {
    transform: translateY(0);
  }

  /* Semi-transparent overlay for mobile when active */
  .user-account-wrapper.is-active::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
}

/* --- Mobile menu toggle --- */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

@media (max-width: 768px) {
  #region-toggle {
    display: none;
  }
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   MOBILE MENU DRAWER
   ============================================ */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.mobile-menu-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: var(--color-white);
  z-index: var(--z-drawer);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.mobile-menu-drawer.is-active {
  transform: translateX(0);
}

/* --- Mobile Header Layout Redesign --- */
@media (max-width: 991px) {
  .header-inner {
    display: flex;
    align-items: center;
    gap: 1rem; /* Reduced gap */
  }

  /* Unwrap actions to allow reordering with other header elements */
  .header-actions {
    display: contents;
  }

  /* 1. Cart (Left) */
  #cart-toggle {
    order: 1;
  }

  /* 2. Account (Left) */
  .auth-container {
    order: 2;
  }

  /* 3. Wishlist (Left) */
  #wishlist-toggle,
  #wishlist-guest-toggle {
    order: 3;
  }

  /* 4. Logo (Center) */
  .header-logo {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    margin: 0;
    order: 4;
  }

  /* 5. Dark/Light Mode (Right) */
  .theme-toggle {
    order: 5;
  }

  /* 6. Search (Right) */
  #search-toggle {
    order: 6;
  }

  /* 7. Menu (Right) */
  .menu-toggle {
    display: flex;
    order: 7;
    margin-right: 0;
  }

  /* Hide Region/Language on mobile as per design */
  #region-toggle {
    display: none;
  }

  /* Hide desktop nav */
  .header-inner nav {
    display: none;
  }
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.mobile-menu-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-nav {
  flex: 1;
  overflow-y: auto;
  /* padding: var(--spacing-md) 0; */
  display: flex;
  flex-direction: column;
}

.mobile-nav-item {
  width: 100%;
}

.mobile-nav-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition-base);
  width: 100%;
}

/* Level 1 */
.mobile-nav-item.level-1 > a,
.mobile-nav-item.level-1 > .mobile-submenu-toggle {
  padding: 1rem var(--spacing-lg);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* Level 2 */
.mobile-nav-item.level-2 > a,
.mobile-nav-item.level-2 > .mobile-submenu-toggle {
  padding: 0.85rem var(--spacing-lg) 0.85rem 2.5rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

[dir="rtl"] .mobile-nav-item.level-2 > a,
[dir="rtl"] .mobile-nav-item.level-2 > .mobile-submenu-toggle {
  padding: 0.85rem 2.5rem 0.85rem var(--spacing-lg);
}

/* Level 3 */
.mobile-nav-item.level-3 > a {
  padding: 0.65rem var(--spacing-lg) 0.65rem 3.5rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-normal);
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

[dir="rtl"] .mobile-nav-item.level-3 > a {
  padding: 0.65rem 3.5rem 0.65rem var(--spacing-lg);
}

/* Level 4 */
.mobile-nav-item.level-4 > a,
.mobile-nav-item.level-4 > .mobile-submenu-toggle {
  padding: 0.6rem var(--spacing-lg) 0.6rem 4.5rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-normal);
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

[dir="rtl"] .mobile-nav-item.level-4 > a,
[dir="rtl"] .mobile-nav-item.level-4 > .mobile-submenu-toggle {
  padding: 0.6rem 4.5rem 0.6rem var(--spacing-lg);
}

.mobile-nav-item a:hover,
.mobile-nav-item a.is-open {
  background-color: var(--color-surface);
  color: var(--color-text);
}

.mobile-submenu {
  display: none;
  background-color: #fafafa;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-submenu.is-open {
  display: block;
  animation: slideDownMobile 0.3s ease-out forwards;
}

@keyframes slideDownMobile {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-arrow {
  transition: transform var(--transition-base);
  opacity: 0.4;
}

.mobile-submenu-toggle.is-open .mobile-nav-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.mobile-submenu-toggle span {
  flex: 1;
}

.mobile-menu-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--color-border-light);
}

.country-selector-simple {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  cursor: pointer;
}

.country-flag-sm {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.header-flag-icon {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 1px var(--color-border-light);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  overflow: hidden;
  display: flex;
  background-color: #0d0d0d;
}

/* Content Positioning */
.hero-section.middle-center {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-section.middle-center .hero-content,
.hero-section.bottom-center .hero-content {
  margin: 0 auto;
}

.hero-section.middle-left {
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  padding-left: var(--spacing-4xl);
}

.hero-section.middle-right {
  justify-content: flex-end;
  align-items: center;
  text-align: right;
  padding-right: var(--spacing-4xl);
}

.hero-section.bottom-center {
  justify-content: center;
  align-items: flex-end;
  text-align: center;
  padding-bottom: var(--spacing-2xl);
}

.hero-section.bottom-left {
  justify-content: flex-start;
  align-items: flex-end;
  text-align: left;
  padding-left: var(--spacing-4xl);
  padding-bottom: var(--spacing-2xl);
}

.hero-section.bottom-right {
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  padding-right: var(--spacing-4xl);
  padding-bottom: var(--spacing-2xl);
}

/* RTL Support - Ensure absolute directions remain absolute */
[dir="rtl"] .hero-section.middle-left,
[dir="rtl"] .hero-section.bottom-left {
  text-align: left;
  padding-left: var(--spacing-4xl);
  padding-right: 0;
  justify-content: flex-end; /* In RTL row, End is Left */
}

[dir="rtl"] .hero-section.middle-right,
[dir="rtl"] .hero-section.bottom-right {
  text-align: right;
  padding-right: var(--spacing-4xl);
  padding-left: 0;
  justify-content: flex-start; /* In RTL row, Start is Right */
}

/* Ensure standard Flex behavior */
[dir="rtl"] .hero-section {
  flex-direction: row;
  margin-left: auto;
  margin-right: calc(-50vw + 50%);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  /* Mobile Modifiers */
  .hero-section.mobile-middle-center {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding-left: var(--spacing-lg) !important;
    padding-right: var(--spacing-lg) !important;
    padding-bottom: var(--spacing-lg) !important;
  }

  .hero-section.mobile-bottom-center {
    justify-content: center !important;
    align-items: flex-end !important;
    text-align: center !important;
    padding-left: var(--spacing-lg) !important;
    padding-right: var(--spacing-lg) !important;
    padding-bottom: var(--spacing-4xl) !important;
  }

  /* Reset RTL specific text alignments for mobile center */
  [dir="rtl"] .hero-section.mobile-middle-center,
  [dir="rtl"] .hero-section.mobile-bottom-center {
    justify-content: center !important;
    text-align: center !important;
    padding-left: var(--spacing-lg) !important;
    padding-right: var(--spacing-lg) !important;
  }
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform var(--transition-slow);
}

.hero-link-mode:hover .hero-media {
  transform: scale(1.03);
}

.hero-link-mode:hover {
  color: inherit;
}

/* Media Container for Desktop/Mobile switching */
.hero-media-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media-desktop {
  display: block;
}

.hero-media-mobile {
  display: none;
}

@media (max-width: 768px) {
  .hero-media-desktop {
    display: none;
  }

  .hero-media-mobile {
    display: block;
  }
}

/* Video and iframe support - ensure full coverage */
.hero-video,
.hero-media-container iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: inherit; /* Inherit from parent section */
  color: var(--color-white);
  /* padding: var(--spacing-xl); */
  max-width: 800px;
  width: 100%;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem); /* Responsive fluid typography */
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em; /* Tighter spacing for larger text */
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); /* improved legibility */
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-lg);
  opacity: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-btn {
  padding: 1rem 3rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all var(--transition-base);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
/* Default: Center (or fallback) */
.section-header,
.header-style-center .section-header {
  margin-bottom: var(--spacing-xl);
  /* padding: 0 var(--container-padding); */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  text-align: center;
  align-items: center;
}

.header-style-split .section-header {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  text-align: inherit;
}

.section-header__title-area {
  flex: 1;
}

.sections-header-view-more-start .section-header__title-area {
  order: 1;
}

.sections-header-view-more-start .section-header__view-more {
  order: 0;
}

.sections-header-view-more-end .section-header__title-area {
  order: 0;
}

.sections-header-view-more-end .section-header__view-more {
  order: 1;
}

/* Below-section View More (placement controlled by body class) */
.section-footer {
  margin-top: var(--spacing-xl, 1.5rem);
}

.section-header__view-more--below {
  display: none;
}

.sections-header-view-more-below .section-header__view-more--header {
  display: none;
}

.sections-header-view-more-below .section-header__view-more--below {
  display: flex;
  margin-top: var(--spacing-xs, 0.5rem);
  width: 100%;
  justify-content: center;
}

.sections-header-view-more-below.heading-layout-align-left
  .section-header__view-more--below {
  justify-content: flex-start;
}

.sections-header-view-more-below.heading-layout-align-right
  .section-header__view-more--below {
  justify-content: flex-end;
}

.header-style-center .section-header__title-area {
  max-width: 800px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl); /* 32px */
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 0;
  line-height: 1.2;
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 600px;
}

.section-header--center .section-subtitle {
  margin: 0 auto;
}

.section-heading-layout {
  --section-heading-decoration-color: var(--color-accent);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  width: 100%;
}

/* ============================================
   Global Heading Layout (from layout.json)
   ============================================ */

.heading-layout-align-left .section-heading-layout {
  text-align: left;
  align-items: flex-start;
}

.heading-layout-align-center .section-heading-layout {
  text-align: center;
  align-items: center;
}

.heading-layout-align-right .section-heading-layout {
  text-align: right;
  align-items: flex-end;
}

.heading-layout-align-left .section-heading-subtitle {
  margin-inline: 0;
}

.heading-layout-align-center .section-heading-subtitle {
  margin-inline: auto;
}

.heading-layout-align-right .section-heading-subtitle {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

.heading-layout-style-modern .section-heading-title {
  letter-spacing: -0.035em;
  text-transform: none;
}

.heading-layout-style-modern .section-heading-subtitle {
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.heading-layout-style-contrast .section-heading-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--fw-bold);
}

.heading-layout-style-contrast .section-heading-subtitle {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.heading-layout-decoration-line .section-heading-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--section-heading-decoration-color);
  border-radius: 999px;
  margin-top: 12px;
}

.heading-layout-decoration-line.heading-layout-align-center
  .section-heading-title::after {
  margin-inline: auto;
}

.heading-layout-decoration-line.heading-layout-align-right
  .section-heading-title::after {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

.heading-layout-decoration-dot .section-heading-subtitle::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--section-heading-decoration-color);
  margin-inline-end: 8px;
  vertical-align: middle;
}

.heading-layout-decoration-box .section-heading-title {
  display: inline-block;
  padding: 0.2em 0.65em;
  border: 1px solid
    color-mix(in srgb, var(--section-heading-decoration-color) 35%, transparent);
  border-radius: 999px;
}

.section-heading-align-left {
  text-align: left !important;
  align-items: flex-start !important;
}

.section-heading-align-center {
  text-align: center !important;
  align-items: center !important;
}

.section-heading-align-right {
  text-align: right !important;
  align-items: flex-end !important;
}

.section-heading-align-left .section-heading-subtitle {
  margin-inline: 0 !important;
}

.section-heading-align-center .section-heading-subtitle {
  margin-inline: auto !important;
}

.section-heading-align-right .section-heading-subtitle {
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
}

/* When using global "Side by Side" header mode, the heading alignment controls
   may default to center (especially if schema options are removed). In that case,
   keep the title/subtitle aligned to the start of their column. */
.header-style-split.heading-layout-align-center .section-heading-layout {
  text-align: start !important;
  align-items: flex-start !important;
}

.header-style-split.heading-layout-align-center .section-heading-subtitle {
  margin-inline: 0 !important;
}

.header-style-split.heading-layout-align-center.heading-layout-decoration-line
  .section-heading-title::after {
  margin-inline-start: 0 !important;
  margin-inline-end: auto !important;
}

/* In global "Side by Side" header mode, keep centered heading settings from
   forcing the title block back to middle alignment. */
.header-style-split .section-header .section-heading-align-center {
  text-align: start !important;
  align-items: flex-start !important;
}

.header-style-split
  .section-header
  .section-heading-align-center
  .section-heading-subtitle {
  margin-inline: 0 !important;
}

.section-heading-style-modern .section-heading-title {
  letter-spacing: -0.035em;
  text-transform: none;
}

.section-heading-style-modern .section-heading-subtitle {
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-heading-style-contrast .section-heading-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--fw-bold);
}

.section-heading-style-contrast .section-heading-subtitle {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.section-heading-decoration-line .section-heading-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--section-heading-decoration-color);
  border-radius: 999px;
  margin-top: 12px;
}

.section-heading-decoration-line.section-heading-align-center
  .section-heading-title::after {
  margin-inline: auto;
}

.section-heading-decoration-line.section-heading-align-right
  .section-heading-title::after {
  margin-inline-start: auto;
}

.section-heading-decoration-dot .section-heading-subtitle::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--section-heading-decoration-color);
  margin-inline-end: 8px;
  vertical-align: middle;
}

.section-heading-decoration-box .section-heading-title {
  display: inline-block;
  padding: 0.2em 0.65em;
  border: 1px solid
    color-mix(in srgb, var(--section-heading-decoration-color) 35%, transparent);
  border-radius: 999px;
}

/* Global heading pre-decorations from Layout settings */
.section-heading-title,
.section-heading-subtitle {
  position: relative;
}

.heading-title-pre-bar .section-heading-title,
.heading-title-pre-spark .section-heading-title,
.heading-subtitle-pre-line .section-heading-subtitle,
.heading-subtitle-pre-spark .section-heading-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.heading-title-pre-bar .section-heading-title::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-accent);
}

.heading-subtitle-pre-line .section-heading-subtitle::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
}

.heading-subtitle-pre-spark .section-heading-subtitle::before {
  content: "✦";
  color: var(--color-accent);
  font-size: 0.95em;
  line-height: 1;
}

.heading-title-pre-spark .section-heading-title::before {
  content: "✦";
  color: var(--color-accent);
  font-size: 0.95em;
  line-height: 1;
}

/* --- View More Link --- */
.section-header__view-more {
  display: flex;
  flex-shrink: 0;
  margin-bottom: 2px; /* Small adjustment for alignment with title baseline */
}

.view-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  transition: all var(--transition-base);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.view-more-link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  gap: 12px;
}

.view-more-icon {
  transition: transform var(--transition-base);
}

[dir="rtl"] .view-more-icon {
  transform: rotate(180deg);
}

.view-more-link:hover .view-more-icon {
  transform: translateX(4px);
}

[dir="rtl"] .view-more-link:hover .view-more-icon {
  transform: rotate(180deg) translateX(4px);
}

/* --- View More Button Style Variants (controlled via body class) --- */

/* Shared: turn .view-more-link into a button appearance */
.view-more-style-btn-outline .view-more-link,
.view-more-style-btn-primary .view-more-link,
.view-more-style-btn-secondary .view-more-link,
.view-more-style-btn-ghost .view-more-link {
  padding: var(--btn-md-padding);
  font-size: var(--btn-md-fs);
  border-radius: var(--radius-sm, 4px);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: var(--fw-medium, 500);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  align-self: center;
}

/* In below position, use larger button size */
.view-more-style-btn-outline .section-header__view-more--below .view-more-link,
.view-more-style-btn-primary .section-header__view-more--below .view-more-link,
.view-more-style-btn-secondary
  .section-header__view-more--below
  .view-more-link,
.view-more-style-btn-ghost .section-header__view-more--below .view-more-link {
  padding: var(--btn-lg-padding);
  font-size: var(--btn-lg-fs);
  min-width: 180px;
  justify-content: center;
}

/* Hide the arrow icon when using button styles */
.view-more-style-btn-outline .view-more-icon,
.view-more-style-btn-primary .view-more-icon,
.view-more-style-btn-secondary .view-more-icon,
.view-more-style-btn-ghost .view-more-icon {
  display: none;
}

/* Outline Button */
.view-more-style-btn-outline .view-more-link {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.view-more-style-btn-outline .view-more-link:hover {
  background-color: var(--color-surface);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  gap: 8px;
}

/* Primary Button */
.view-more-style-btn-primary .view-more-link {
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
  border-color: var(--color-accent);
}

.view-more-style-btn-primary .view-more-link:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  gap: 8px;
}

/* Secondary Button */
.view-more-style-btn-secondary .view-more-link {
  background-color: var(--color-surface);
  color: var(--color-accent);
  border-color: transparent;
}

.view-more-style-btn-secondary .view-more-link:hover {
  background-color: var(--color-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  gap: 8px;
}

/* Ghost Button */
.view-more-style-btn-ghost .view-more-link {
  background-color: transparent;
  color: var(--color-text);
  border-color: transparent;
}

.view-more-style-btn-ghost .view-more-link:hover {
  background-color: var(--color-surface);
  color: var(--color-accent);
  gap: 8px;
}

svg.theme-icon-filled {
  fill: #d86f6f !important;
}

@media (max-width: 768px) {
  .section-header {
    margin-bottom: var(--spacing-xl);
    padding: 0 var(--spacing-md);
  }

  .header-style-split .section-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .header-style-split .section-header__view-more {
    width: auto;
    margin-top: 0;
  }

  .section-header__view-more {
    width: auto;
    margin-top: var(--spacing-xs);
  }

  /* If "View All" is before title, prevent extra top spacing on mobile. */
  .sections-header-view-more-start .section-header__view-more {
    margin-top: 0;
  }

  .section-title {
    font-size: var(--fs-2xl); /* 24px */
  }

  .section-subtitle {
    font-size: var(--fs-sm);
  }

  .section {
    /* padding-top: var(--spacing-md) !important;
    padding-bottom: var(--spacing-md) !important; */
  }

  .products-section,
  .featured-collection,
  .brand-story {
    padding-top: var(--spacing-md) !important;
    padding-bottom: var(--spacing-md) !important;
  }
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-section {
  padding: var(--spacing-lg) 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(var(--desktop-cols, 4), 1fr);
  gap: var(--spacing-lg);
}

@media (max-width: 991px) {
  .product-grid {
    grid-template-columns: repeat(var(--tablet-cols, 3), 1fr);
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(var(--mobile-cols, 2), 1fr);
    gap: var(--spacing-md);
  }
}

.product-slider {
  display: flex;
  gap: var(--spacing-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.product-slider::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.product-slider .product-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.product-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* ============================================
   SPLIT BANNER / LOOKBOOK
   ============================================ */
.split-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.split-banner-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.split-banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.split-banner-item:hover img {
  transform: scale(1.03);
}

.split-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: var(--spacing-3xl);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, transparent 60%);
}

.split-banner-title {
  color: var(--color-white);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
}

.split-banner-btn {
  /* Inherits from .btn .btn--outline .btn--sm added in template */
  border-color: var(--color-white);
  color: var(--color-white);
}

.split-banner-btn:hover {
  background-color: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
}

/* ============================================
   BRAND STORY / ABOUT SECTION
   ============================================ */
.brand-story {
  padding: var(--spacing-3xl) 0;
  text-align: center;
}

.brand-story-inner {
  max-width: 720px;
  margin: 0 auto;
}

.brand-story-text {
  font-size: var(--fs-md);
  font-weight: var(--fw-light);
  line-height: 1.9;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.brand-story-text p + p {
  margin-top: var(--spacing-lg);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-3xl);
  margin-bottom: var(--spacing-3xl);
}

.footer-brand-name {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  /* margin-bottom: var(--spacing-md); */
}

.footer-brand-desc {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  max-width: 320px;
  letter-spacing: 0.02em;
}

.footer-links a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition-fast);
  letter-spacing: 0.02em;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.6);
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.footer-social a:hover {
  border-color: var(--color-white);
  color: var(--color-white);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-copy {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
}

/* ============================================
   CART DRAWER
   ============================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.cart-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: var(--color-white);
  z-index: var(--z-drawer);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.cart-drawer.is-active {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) var(--spacing-md);
  border-bottom: 1px solid var(--color-border-light);
}

.cart-drawer-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  text-transform: capitalize;
  display: flex;
  align-items: center;
}

.cart-drawer-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-drawer-close svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.5;
}

.cart-drawer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Footer sticky at bottom */
  min-height: 0;
}

/* Empty State */
.cart-drawer-header.is-empty {
  border-bottom: none;
}

.cart-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  text-align: center;
}

.cart-empty-message {
  font-size: var(--fs-2xl); /* Much larger per screenshot */
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
  letter-spacing: -0.02em;
  font-weight: var(--fw-regular);
}

.cart-empty-subtext {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xl);
}

.cart-empty-subtext a {
  color: var(--color-text);
  text-decoration: underline;
  font-weight: var(--fw-medium);
}

.cart-empty-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  width: 100%;
  max-width: 220px;
}

.cart-continue-btn {
  /* Inherits from .btn .btn--outline .btn--md */
}

.cart-continue-btn:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-white);
  border-color: var(--color-accent-hover);
}

.cart-continue-btn.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.cart-continue-btn.btn-outline:hover {
  background-color: var(--color-text);
  color: var(--color-white);
}

/* Shipping Progress Bar */
.cart-shipping-threshold {
  display: none;
  padding: var(--spacing-sm);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

.shipping-info {
  margin-bottom: var(--spacing-xs);
}

.shipping-message {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.shipping-progress-bg {
  width: 100%;
  height: 8px;
  background-color: var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.shipping-progress-bar {
  height: 100%;
  background-color: var(--color-text);
  width: 0%;
  border-radius: var(--radius-sm);
  transition:
    width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease;
}

.cart-shipping-threshold.is-complete .shipping-progress-bar {
  background-color: var(--color-success);
}

/* Cart Items List */
.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.cart-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.cart-item-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Reduced gap for tighter layout */
  position: relative;
}

/* Row 1: Title and Total Price */
.cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.cart-item-main-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin: 0;
  line-height: 1.25;
  padding-inline-end: 12px;
}

.cart-item-prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cart-item-total-price {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  white-space: nowrap;
}

.cart-item-old-price {
  font-size: var(--fs-xs);
  color: #c0c0c0;
  text-decoration: line-through;
  margin-bottom: -1px;
}

.cart-item-variant {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.cart-item-unit-price {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  opacity: 0.7;
}

/* Row 4: Controls */
.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px; /* Added margin for better separation */
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  height: 32px;
  background: var(--color-white);
  width: fit-content;
}

.quantity-selector button {
  width: 28px;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: color var(--transition-base);
}

.quantity-selector button:hover {
  color: var(--color-text-muted);
}

.quantity-selector span {
  width: 28px;
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}

.cart-remove-btn {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-remove-btn svg {
  width: 16px;
  height: 16px;
}

.cart-remove-btn:hover {
  color: var(--color-error);
}

/* Cart Footer */
.cart-drawer-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--color-border-light);
  background: var(--color-white);
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.cart-summary-row.total {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border-light);
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}

.cart-total-price {
  font-size: var(--fs-lg);
  color: var(--color-text);
}

.cart-note {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

.cart-checkout-btn,
.cart-coupon-apply,
.cart-page-continue,
.cart-loyalty-apply {
  border-radius: var(--radius-md) !important;
}

.cart-checkout-btn:hover {
  opacity: 0.9;
  color: var(--color-white);
}

.cart-count-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 12px;
  font-weight: var(--fw-medium);
  min-width: 24px;
  height: 24px;
  border-radius: var(--radius-lg);
  padding: 0 6px;
  margin-inline-start: 8px;
  vertical-align: middle;
}

/* Cart Loyalty Widget */
.cart-loyalty-widget {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--color-surface);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
}

.cart-loyalty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.cart-loyalty-text strong {
  font-weight: var(--fw-bold);
}

/* ============================================
   CART PAGE (full /cart page)
   ============================================ */
.cart-page {
  padding: var(--spacing-2xl) 0 var(--spacing-3xl);
}

.cart-page-title {
  display: flex;
  align-items: center;
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-xl);
}

.cart-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: var(--spacing-2xl);
  align-items: start;
}

/* Items */
.cart-page-items {
  display: flex;
  flex-direction: column;
}

.cart-page-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: opacity var(--transition-base);
}

.cart-page-item:first-child {
  padding-top: 0;
}

.cart-page-item-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
}

.cart-page-item-body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  min-width: 0;
}

.cart-page-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.cart-page-item-main {
  min-width: 0;
}

.cart-page-item-name {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  line-height: 1.3;
  margin: 0;
}

.cart-page-item-variant {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.cart-page-item-unit {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.cart-page-item-prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: end;
  white-space: nowrap;
}

.cart-page-item-total {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

.cart-page-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-top: auto;
}

.cart-page-remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  padding: 4px;
  transition: color var(--transition-fast);
}

.cart-page-remove:hover {
  color: var(--color-error);
}

/* Order Summary */
.cart-page-summary {
  position: sticky;
  top: var(--spacing-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
}

.cart-page-summary-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin: 0 0 var(--spacing-lg);
}

.cart-page-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

.cart-page-summary-row.total {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
}

.cart-page-summary-row.total .cart-page-summary-value {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}

.cart-vat-row {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.cart-vat-row .cart-page-summary-value {
  font-weight: var(--fw-medium);
}

.cart-discount-row,
.cart-discount-row .cart-page-summary-value {
  color: var(--color-success, #38a169);
}

.cart-page-item-free {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-sm, 4px);
  background: rgba(56, 161, 105, 0.12);
  color: var(--color-success, #38a169);
  font-size: 0.62rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.cart-page-summary .cart-note {
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

/* Bundle sub-items */
/* Bundle contents (dynamic_bundle): titled panel under the line item.
   Shared by the cart page (.cart-page-item-bundle) and drawer (.cart-item-bundle). */
.cart-bundle {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm, 6px);
}

.cart-bundle-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text);
}

.cart-bundle-label svg {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--color-accent);
}

.cart-page-item-bundle,
.cart-item-bundle {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cart-page-item-bundle li,
.cart-item-bundle li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--color-text-muted);
}

.cart-bundle-qty {
  flex: none;
  min-width: 24px;
  text-align: center;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--color-accent-contrast, #fff);
  background: var(--color-accent);
  border-radius: 999px;
}

.cart-bundle-name {
  color: var(--color-text);
}

/* Per-item stock/error + price-change messages */
.cart-page-item-error,
.cart-page-item-notice {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: var(--spacing-sm);
  font-size: var(--fs-xs);
  line-height: 1.5;
  white-space: pre-line;
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.cart-page-item-error {
  color: #b42318;
  background: rgba(217, 45, 32, 0.07);
  border: 1px solid rgba(217, 45, 32, 0.2);
}

.cart-page-item-error svg {
  flex: none;
  margin-top: 2px;
}

.cart-page-item-notice {
  color: #92610a;
  background: rgba(247, 144, 9, 0.08);
  border: 1px solid rgba(247, 144, 9, 0.22);
}

.cart-page-item.has-error {
  border-inline-start: 3px solid #d92d20;
  padding-inline-start: var(--spacing-sm);
}

/* Discount coupon */
.cart-coupon {
  margin: var(--spacing-md) 0;
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-light);
}

.cart-coupon-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  margin-bottom: 6px;
}

.cart-coupon-form {
  display: flex;
  gap: var(--spacing-sm);
}

.cart-coupon-input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-sm);
  outline: none;
}

.cart-coupon-input:focus {
  border-color: var(--color-accent);
}

.cart-coupon-apply,
.cart-loyalty-apply {
  flex: none;
  white-space: nowrap;
}

.cart-coupon-apply.is-loading,
.cart-loyalty-apply.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.cart-coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  padding: 0.6rem 0.75rem;
  border: 1px dashed var(--color-success, #38a169);
  border-radius: var(--radius-md);
  background: rgba(56, 161, 105, 0.07);
}

.cart-coupon-applied-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-success, #38a169);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
}

.cart-coupon-remove {
  flex: none;
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.cart-coupon-remove:hover {
  color: var(--color-text);
}

/* Drawer bundle sub-items share the .cart-bundle* styles defined above. */

.cart-item-error {
  margin-top: 8px;
  font-size: var(--fs-xs);
  line-height: 1.5;
  white-space: pre-line;
  color: #b42318;
  background: rgba(217, 45, 32, 0.07);
  border: 1px solid rgba(217, 45, 32, 0.2);
  border-radius: var(--radius-md);
  padding: 7px 9px;
}

/* Store-closed note + disabled checkout + view-cart */
.cart-closed-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: var(--spacing-sm);
  padding: 10px 12px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: #92610a;
  background: rgba(247, 144, 9, 0.1);
  border: 1px solid rgba(247, 144, 9, 0.3);
  border-radius: var(--radius-md);
}

.cart-closed-note svg {
  flex: none;
  margin-top: 2px;
}

.cart-checkout-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.cart-view-btn {
  margin-top: var(--spacing-sm);
}

.cart-page-payment-widgets:not(:empty) {
  margin: var(--spacing-md) 0;
}

.cart-page-shipping {
  display: block;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.cart-coupon-error {
  margin-top: 8px;
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: #b42318;
}

/* Cart loyalty section — plain section to match the coupon block */
.cart-loyalty {
  margin: var(--spacing-md) 0;
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-light);
}

.cart-loyalty-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  margin-bottom: 8px;
}

.cart-loyalty-head svg {
  color: #f5b301;
  flex: none;
}

.cart-loyalty-earn {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
}

.cart-loyalty-earn [data-loyalty-calculated-points] {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}

.cart-loyalty-login {
  color: var(--color-accent);
  text-decoration: underline;
}

.cart-loyalty-balance {
  font-size: var(--fs-sm);
  color: var(--color-text);
  margin: 8px 0;
}

.cart-loyalty-form {
  display: flex;
  gap: var(--spacing-sm);
}

.cart-loyalty-select {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-sm);
}

.cart-loyalty-select:focus {
  border-color: var(--color-accent);
  outline: none;
}

.cart-loyalty-apply {
  flex: none;
  white-space: nowrap;
}

.cart-loyalty-applied {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.cart-loyalty-applied-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px dashed var(--color-success, #38a169);
  border-radius: var(--radius-md);
  background: rgba(56, 161, 105, 0.07);
  color: var(--color-success, #38a169);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.cart-loyalty-remove {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.cart-loyalty-remove:hover {
  color: #b42318;
}

/* Cart gift order */
.cart-gift {
  margin: var(--spacing-md) 0;
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-light);
}

.cart-gift-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.cart-gift-btn svg {
  flex: none;
}

.cart-gift-label {
  flex: 1;
  text-align: start;
}

.cart-gift-action {
  color: var(--color-accent);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.cart-gift-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.cart-gift-summary[hidden] {
  display: none;
}

.cart-gift-summary-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-gift-names {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--color-text);
}

.cart-gift-names strong {
  font-weight: var(--fw-semibold);
}

.cart-gift-names-label {
  color: var(--color-text-muted);
  font-weight: 400;
}

.cart-gift-message {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.cart-gift-remove {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.cart-gift-remove:hover {
  color: #b42318;
}

.cart-page-summary .cart-checkout-btn {
  margin-top: var(--spacing-sm);
}

.cart-page-continue-link {
  display: block;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--color-text);
  text-decoration: underline;
  margin-top: var(--spacing-md);
  transition: color var(--transition-fast);
}

.cart-page-continue-link:hover {
  color: var(--color-text-muted);
}

/* Empty State */
.cart-page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--spacing-md);
  padding: var(--spacing-4xl) var(--spacing-md);
  color: var(--color-text-muted);
}

.cart-page-empty-message {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin: 0;
}

.cart-page-empty .cart-page-continue {
  margin-top: var(--spacing-sm);
}

/* Responsive */
@media (max-width: 991px) {
  .cart-page-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .cart-page-summary {
    position: static;
  }
}

@media (max-width: 575px) {
  .cart-page-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--spacing-lg);
  }

  .cart-page-item {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: var(--spacing-md);
  }
}

/* ============================================
   PLACEHOLDER PRODUCT IMAGES (SVG)
   ============================================ */
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.placeholder-img.bg-black {
  background-color: var(--color-accent);
  color: #555;
}
.placeholder-img.bg-green {
  background-color: #3d5a47;
  color: #6b8a75;
}
.placeholder-img.bg-oatmeal {
  background-color: #e8dfd0;
  color: #bfb5a5;
}
.placeholder-img.bg-white {
  background-color: var(--color-surface);
  color: #ccc;
}
.placeholder-img.bg-espresso {
  background-color: #4a3728;
  color: #7a6252;
}
.placeholder-img.bg-khaki {
  background-color: #b5a78e;
  color: #8c7f6a;
}
.placeholder-img.bg-grey {
  background-color: #8e8e8e;
  color: #b0b0b0;
}
.placeholder-img.bg-dusty-green {
  background-color: #6b8a6e;
  color: #92b095;
}
.placeholder-img.bg-sand {
  background-color: #d4c5a9;
  color: #b8a88e;
}
.placeholder-img.bg-brown {
  background-color: #6b4c35;
  color: #9b7c64;
}
.placeholder-img.bg-forest {
  background-color: #2d4a2e;
  color: #5a7a5b;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  :root {
    --container-padding: 1.5rem;
  }

  .hero-title {
    font-size: var(--fs-4xl);
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
    --header-height: 56px;
  }

  /* Header mobile layout */
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
  }

  .header-inner nav {
    display: none;
  }

  .header-nav {
    display: none;
  }

  /* Header mobile layout */
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
  }

  .menu-toggle {
    display: flex;
    order: 5;
  }

  .header-actions {
    display: contents; /* Allows children to be re-ordered in .header-inner */
  }

  #search-toggle {
    order: 4;
  }

  .header-logo {
    flex: 1;
    display: flex;
    justify-content: center;
    order: 3;
  }

  .header-logo a {
    justify-content: center;
    font-size: var(--fs-lg);
  }

  #account-toggle,
  #login-toggle {
    order: 1;
  }

  #cart-toggle {
    order: 2;
  }

  .header-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-action-btn svg {
    width: 20px;
    height: 20px;
  }

  .split-banner {
    grid-template-columns: 1fr;
  }

  .split-banner-item {
    aspect-ratio: 3 / 4;
  }

  /* Hero mobile: full-width edge-to-edge */
  .hero-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 100vh;
    min-height: 400px;
  }

  .hero-title {
    font-size: var(--fs-3xl);
    letter-spacing: 0.15em;
  }

  .hero-subtitle {
    font-size: var(--fs-sm);
  }

  .section-title {
    font-size: var(--fs-xl);
  }

  .newsletter-form {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .newsletter-form input[type="email"] {
    border-right: 1px solid var(--color-border);
  }

  .newsletter-form button {
    width: 100%;
  }

  .product-quick-add {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 0.75rem;
  }

  .hero-section {
    height: 100vh;
    min-height: 360px;
  }

  .hero-title {
    font-size: var(--fs-2xl);
    letter-spacing: 0.1em;
  }

  .hero-subtitle {
    font-size: var(--fs-xs);
    letter-spacing: 0.1em;
  }

  .hero-btn {
    padding: 0.75rem 2rem;
    font-size: 10px;
  }

  .hero-content {
    padding: var(--spacing-md);
  }

  .split-banner-title {
    font-size: var(--fs-lg);
  }

  .header-logo a {
    font-size: var(--fs-base);
    letter-spacing: 0.12em;
  }

  .product-card-title {
    font-size: 10px;
  }

  .product-card-color {
    font-size: 10px;
  }

  .product-card-price {
    font-size: var(--fs-xs);
  }
}

/* ---------- VAT Exempt Tag ---------- */
.vat-exempt-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text, #1a1a1a);
  background: rgba(56, 161, 105, 0.12);
  padding: 3px 8px;
  border-radius: var(--radius-sm, 0);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
}

.vat-exempt-tag svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.product-card-vat-exempt {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  border-radius: 0 0 0 var(--radius-sm, 0);
  color: var(--color-text, #1a1a1a);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  pointer-events: none;
}

.product-vat-exempt {
  margin-top: 10px;
  font-size: 0.8rem;
}

.product-vat-exempt svg {
  width: 15px;
  height: 15px;
}

/* ---------- Low Stock Indicator ---------- */
.low-stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: #c2410c;
  margin-top: 6px;
}

.low-stock-indicator svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.low-stock-indicator.d-none {
  display: none;
}

.product-low-stock {
  margin: 4px 0 12px;
  font-size: 0.85rem;
}

.product-low-stock svg {
  width: 16px;
  height: 16px;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.7s ease forwards;
}

/* Apply animations to sections when they become visible */
.products-section .section-title,
.brand-story .section-title,
.newsletter-section .newsletter-title {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.products-section.is-visible .section-title,
.brand-story.is-visible .section-title,
.newsletter-section.is-visible .newsletter-title {
  opacity: 1;
  transform: translateY(0);
}

.product-card {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.products-section.is-visible .product-card {
  opacity: 1;
  transform: translateY(0);
}

.products-section.is-visible .product-card:nth-child(1) {
  transition-delay: 0.05s;
}
.products-section.is-visible .product-card:nth-child(2) {
  transition-delay: 0.1s;
}
.products-section.is-visible .product-card:nth-child(3) {
  transition-delay: 0.15s;
}
.products-section.is-visible .product-card:nth-child(4) {
  transition-delay: 0.2s;
}
.products-section.is-visible .product-card:nth-child(5) {
  transition-delay: 0.25s;
}
.products-section.is-visible .product-card:nth-child(6) {
  transition-delay: 0.3s;
}
.products-section.is-visible .product-card:nth-child(7) {
  transition-delay: 0.35s;
}
.products-section.is-visible .product-card:nth-child(8) {
  transition-delay: 0.4s;
}

/* ============================================
   COLLECTION PAGE
   ============================================ */

/* Collection Header */
.collection-header {
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  border-bottom: 1px solid var(--color-border-light);
}

.collection-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-top: var(--spacing-md);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-text);
}

.breadcrumb svg {
  opacity: 0.4;
  flex-shrink: 0;
}

.breadcrumb span {
  color: var(--color-text);
  font-weight: var(--fw-medium);
}

/* Placeholder image backgrounds (for homepage fallback) */
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-img.bg-black {
  background-color: var(--color-accent);
  color: var(--color-bg);
}
.placeholder-img.bg-green {
  background-color: #2d4a3e;
  color: var(--color-bg);
}
.placeholder-img.bg-oatmeal {
  background-color: #d4c9b8;
  color: var(--color-text);
}
.placeholder-img.bg-white {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.placeholder-img.bg-espresso {
  background-color: #3c2415;
  color: var(--color-bg);
}
.placeholder-img.bg-khaki {
  background-color: #c3b091;
  color: var(--color-text);
}
.placeholder-img.bg-grey {
  background-color: #555;
  color: var(--color-bg);
}
.placeholder-img.bg-dusty-green {
  background-color: #6b8f71;
  color: var(--color-bg);
}
.placeholder-img.bg-forest {
  background-color: #1b4332;
  color: var(--color-bg);
}

@media (max-width: 768px) {
  .collection-header {
    padding: var(--spacing-xl) 0 var(--spacing-md);
  }

  .collection-title {
    font-size: var(--fs-xl);
  }

  .toolbar-inner {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: flex-start;
  }

  .sort-select {
    width: 100%;
  }

  .cart-drawer {
    width: 100%;
    max-width: 100%;
  }
}

/* ---------- Empty State ---------- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--spacing-4xl) var(--spacing-md);
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  width: 100%;
}

.empty-state-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.empty-state-subtitle {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* --- Auth Loader --- */
.auth-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--color-text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   PERF: skip rendering off-screen homepage sections
   The browser skips layout/paint of sections until they
   approach the viewport, cutting work on long homepages.
   `auto` in contain-intrinsic-size lets it remember each
   section's real height after it has rendered once.
   ============================================ */
.home-sections > .section {
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}

/* Always render the first section (hero / above the fold) so LCP isn't delayed. */
.home-sections > .section:first-child {
  content-visibility: visible;
}
