/* ==========================================================================
   DERMAX LAB ACADEMY — GLOBAL DESIGN SYSTEM
   Replacement for: assets/css/global.css

   Purpose:
   - Locked DERMAX colors and typography
   - Global layout helpers
   - Accessible sticky glass header
   - Desktop navigation + Courses dropdown
   - Clean NON-ANIMATING Courses chevron
   - Light/Dark logo switching
   - Mobile drawer
   - Foundation placeholder until homepage integration
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
  /* Typography */
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", Arial, Helvetica, sans-serif;

  /* Core palette */
  --color-bg: #ffffff;
  --color-bg-soft: #fbf8f2;
  --color-surface: #fffdfa;

  --color-text: #171717;
  --color-text-secondary: #6d675e;
  --color-text-muted: #8b847a;

  --color-gold: #b78a43;
  --color-gold-dark: #956b2d;
  --color-gold-light: #d8b776;

  --color-border: rgba(183, 138, 67, 0.24);
  --color-border-soft: rgba(183, 138, 67, 0.12);

  /* Layout */
  --page-max-width: 1600px;
  --page-padding: clamp(20px, 4vw, 72px);

  --section-space-desktop: 80px;
  --section-space-tablet: 64px;
  --section-space-mobile: 52px;

  /* Radius */
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-card: 16px;
  --radius-panel: 22px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 8px 24px rgba(47, 37, 23, 0.06);
  --shadow-md: 0 18px 46px rgba(47, 37, 23, 0.10);
  --shadow-lg: 0 28px 70px rgba(47, 37, 23, 0.16);

  /* Header */
  --header-bg: rgba(255, 255, 255, 0.76);
  --header-bg-scrolled: rgba(255, 255, 255, 0.60);

  /* Motion */
  --ease: cubic-bezier(0.16, 0.84, 0.24, 1);
  --transition-fast: 180ms ease;
  --transition-normal: 260ms ease;
  --transition-slow: 360ms var(--ease);
}


/* ==========================================================================
   2. DARK THEME
   ========================================================================== */

html[data-theme="dark"] {
  --color-bg: #101112;
  --color-bg-soft: #171819;
  --color-surface: #1b1c1d;

  --color-text: #f4f3ef;
  --color-text-secondary: #c1beb8;
  --color-text-muted: #969089;

  --color-border: rgba(216, 183, 118, 0.16);
  --color-border-soft: rgba(216, 183, 118, 0.08);

  --header-bg: rgba(16, 17, 18, 0.76);
  --header-bg-scrolled: rgba(16, 17, 18, 0.62);
}


/* ==========================================================================
   3. BASE / RESET
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--color-bg);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.dermax-menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  margin: 0;
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}


/* ==========================================================================
   4. GLOBAL LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

.section {
  padding-block: var(--section-space-desktop);
}

.section-heading {
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 40px;
  text-align: center;
}

.section-eyebrow {
  margin: 0 0 10px;
  color: var(--color-gold);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: clamp(36px, 3.2vw, 48px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-description {
  margin: 12px 0 0;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
}


/* ==========================================================================
   5. ACCESSIBILITY
   ========================================================================== */

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

.screen-reader-text:focus,
.skip-link:focus {
  position: fixed !important;
  top: 10px;
  left: 10px;
  z-index: 999999;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  overflow: visible;
  clip: auto;
  border-radius: 8px;
  background: #171717;
  color: #ffffff;
  box-shadow: var(--shadow-md);
}


/* ==========================================================================
   6. GLOBAL HEADER — GLASS + STICKY + SHRINK ON SCROLL
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--header-bg);
  border-bottom: 1px solid var(--color-border-soft);

  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);

  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);

  transition:
    background var(--transition-slow),
    border-color var(--transition-normal),
    box-shadow var(--transition-slow),
    -webkit-backdrop-filter var(--transition-slow),
    backdrop-filter var(--transition-slow);
}

/* WordPress admin bar */
body.admin-bar .site-header {
  top: 32px;
}

html[data-theme="dark"] .site-header {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.site-header.scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--color-border);

  -webkit-backdrop-filter: blur(26px) saturate(155%);
  backdrop-filter: blur(26px) saturate(155%);

  box-shadow:
    0 12px 34px rgba(31, 25, 18, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

html[data-theme="dark"] .site-header.scrolled {
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(255, 255, 255, 0.96);
  }

  html[data-theme="dark"] .site-header {
    background: rgba(16, 17, 18, 0.97);
  }
}


/* ==========================================================================
   7. HEADER TOP ROW
   ========================================================================== */

.header-main {
  min-height: 92px;

  display: grid;
  grid-template-columns:
    minmax(220px, 270px)
    minmax(300px, 1fr)
    auto;

  align-items: center;
  gap: clamp(20px, 2.6vw, 42px);

  transition: min-height var(--transition-slow);
}

.site-header.scrolled .header-main {
  min-height: 72px;
}


/* ==========================================================================
   8. LOGO
   ========================================================================== */

.site-brand {
  position: relative;
  display: block;
  width: clamp(218px, 15vw, 268px);
  height: 64px;
  flex: 0 0 auto;

  transition:
    width var(--transition-slow),
    height var(--transition-slow);
}

.site-logo {
  position: absolute;
  inset: 0 auto auto 0;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: left center;

  transition:
    opacity var(--transition-fast),
    transform var(--transition-normal);
}

.site-logo-light {
  display: none;
}

html[data-theme="dark"] .site-logo-dark {
  display: none;
}

html[data-theme="dark"] .site-logo-light {
  display: block;
}

.site-brand:hover .site-logo {
  transform: translateY(-1px);
}

.site-header.scrolled .site-brand {
  width: clamp(195px, 13.5vw, 238px);
  height: 50px;
}


/* ==========================================================================
   9. HEADER SEARCH
   ========================================================================== */

.header-search {
  position: relative;
  width: 100%;
  max-width: 620px;
  justify-self: center;
}

.header-search input {
  width: 100%;
  height: 50px;

  padding: 0 24px 0 54px;

  border: 1px solid rgba(183, 138, 67, 0.46);
  border-radius: var(--radius-pill);
  outline: none;

  background: rgba(255, 255, 255, 0.14);
  color: var(--color-text);

  font-size: 13px;

  transition:
    height var(--transition-slow),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

html[data-theme="dark"] .header-search input {
  background: rgba(255, 255, 255, 0.025);
}

.header-search input::placeholder {
  color: var(--color-text-muted);
}

.header-search input:focus {
  border-color: var(--color-gold);
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 4px rgba(183, 138, 67, 0.10);
}

html[data-theme="dark"] .header-search input:focus {
  background: rgba(255, 255, 255, 0.045);
}

.site-header.scrolled .header-search input {
  height: 42px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 20px;

  width: 19px;
  height: 19px;

  transform: translateY(-50%);
  color: var(--color-text-secondary);

  pointer-events: none;
}


/* ==========================================================================
   10. HEADER ACTIONS
   ========================================================================== */

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;

  white-space: nowrap;
}

.action-link {
  position: relative;

  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;

  padding: 6px 8px;

  border-radius: var(--radius-sm);

  color: var(--color-text);
  font-size: 12px;
  font-weight: 500;

  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.action-link:hover {
  transform: translateY(-1px);
  background: rgba(183, 138, 67, 0.07);
  color: var(--color-gold-dark);
}

.action-link svg {
  width: 19px;
  height: 19px;
}

.cart-count {
  min-width: 21px;
  height: 21px;

  display: grid;
  place-items: center;

  padding-inline: 4px;

  border-radius: var(--radius-pill);

  background: var(--color-gold);
  color: #ffffff;

  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}


/* ==========================================================================
   11. THEME TOGGLE / ICON BUTTONS
   ========================================================================== */

.theme-toggle,
.menu-toggle,
.mobile-cart-button,
.mobile-menu-close {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.theme-toggle {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  padding: 0;
  border-radius: 50%;

  color: var(--color-text);

  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: rgba(183, 138, 67, 0.10);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 19px;
  height: 19px;
}

.icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

html[data-theme="dark"] .icon-sun {
  display: block;
}


/* ==========================================================================
   12. HEADER CTA
   ========================================================================== */

.header-cta {
  min-height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  padding: 0 20px;

  border: 1px solid rgba(183, 138, 67, 0.74);
  border-radius: 11px;

  background: #171717;
  color: #ffffff;

  font-size: 12px;
  font-weight: 600;

  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
}

.header-cta:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold-light);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.site-header.scrolled .header-cta {
  min-height: 42px;
  padding-inline: 18px;
}


/* ==========================================================================
   13. DESKTOP NAVIGATION
   ========================================================================== */

.desktop-nav {
  border-top: 1px solid rgba(0, 0, 0, 0.018);
}

html[data-theme="dark"] .desktop-nav {
  border-top-color: rgba(255, 255, 255, 0.025);
}

.nav-container {
  min-height: 60px;

  display: flex;
  align-items: stretch;
  justify-content: center;

  transition: min-height var(--transition-slow);
}

.nav-menu {
  height: 60px;

  display: flex;
  align-items: stretch;
  justify-content: center;

  gap: clamp(32px, 4.6vw, 70px);

  margin: 0;
  padding: 0;

  list-style: none;

  transition:
    height var(--transition-slow),
    gap var(--transition-slow);
}

.site-header.scrolled .nav-container {
  min-height: 48px;
}

.site-header.scrolled .nav-menu {
  height: 48px;
  gap: clamp(27px, 3.9vw, 58px);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  position: relative;

  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: var(--color-text);

  font-size: 13px;
  font-weight: 500;

  transition:
    color var(--transition-fast),
    font-size var(--transition-slow);
}

.site-header.scrolled .nav-link {
  font-size: 12px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-gold-dark);
}

.nav-link.active::after {
  content: "";

  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;

  height: 2px;

  background: var(--color-gold);
}


/* ==========================================================================
   14. COURSES CHEVRON
   IMPORTANT:
   - Works even if header.php still contains the old "⌄" character.
   - The character is hidden and replaced by a CSS-drawn chevron.
   - No rotation / no animation.
   ========================================================================== */

.nav-chevron {
  position: relative;

  width: 12px;
  height: 12px;

  display: inline-block;
  flex: 0 0 12px;

  overflow: hidden;

  font-size: 0;
  line-height: 0;

  color: currentColor;

  transform: translateY(1px);
}

.nav-chevron::before {
  content: "";

  position: absolute;
  top: 2px;
  left: 2px;

  width: 6px;
  height: 6px;

  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;

  transform: rotate(45deg);
  transform-origin: center;
}

/* Intentionally static */
.has-dropdown:hover .nav-chevron,
.has-dropdown:focus-within .nav-chevron {
  transform: translateY(1px);
}


/* ==========================================================================
   15. DESKTOP DROPDOWN
   ========================================================================== */

.dropdown {
  position: absolute;
  top: calc(100% - 3px);
  left: 50%;
  z-index: 50;

  min-width: 230px;

  padding: 9px;

  opacity: 0;
  visibility: hidden;

  transform: translate(-50%, 10px);

  border: 1px solid var(--color-border);
  border-radius: 13px;

  background: var(--color-surface);
  box-shadow: var(--shadow-md);

  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal),
    transform var(--transition-normal);
}

/* Invisible hover bridge prevents dropdown flicker */
.dropdown::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 10px;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown a {
  min-height: 42px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 9px 12px;

  border-radius: 8px;

  color: var(--color-text-secondary);

  font-size: 12px;
  font-weight: 500;

  transition:
    padding var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

.dropdown a:hover,
.dropdown a:focus-visible {
  padding-left: 15px;
  background: var(--color-bg-soft);
  color: var(--color-gold-dark);
}

.dropdown-all {
  margin-top: 4px;
  border-top: 1px solid var(--color-border);
  border-radius: 0 0 8px 8px !important;
  font-weight: 600 !important;
}


/* ==========================================================================
   16. MOBILE HEADER CONTROLS
   ========================================================================== */

.mobile-header-actions {
  display: none;
  align-items: center;
  gap: 3px;
}

.mobile-cart-button,
.menu-toggle {
  position: relative;

  width: 44px;
  height: 44px;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 50%;

  color: var(--color-text);

  transition: background var(--transition-fast);
}

.mobile-cart-button:hover,
.menu-toggle:hover {
  background: rgba(183, 138, 67, 0.10);
}

.mobile-cart-button svg,
.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-cart-button .cart-count {
  position: absolute;
  top: 1px;
  right: 0;

  min-width: 18px;
  height: 18px;

  font-size: 8px;
}


/* ==========================================================================
   17. MOBILE MENU OVERLAY
   ========================================================================== */

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1990;

  background: rgba(0, 0, 0, 0.44);

  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
}

.mobile-menu-overlay.visible {
  opacity: 1;
  visibility: visible;
}


/* ==========================================================================
   18. MOBILE MENU DRAWER
   ========================================================================== */

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2000;

  width: min(420px, 100%);
  height: 100dvh;

  padding: 24px;

  overflow-y: auto;
  overscroll-behavior: contain;

  background: var(--color-surface);
  color: var(--color-text);

  box-shadow: var(--shadow-lg);

  transform: translateX(105%);

  transition: transform 400ms var(--ease);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-top {
  min-height: 64px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding-bottom: 18px;

  border-bottom: 1px solid var(--color-border);
}

.mobile-menu-brand {
  position: relative;

  width: 205px;
  height: 50px;

  display: block;
}

.mobile-menu-close {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 50%;

  font-size: 27px;
  line-height: 1;

  transition: background var(--transition-fast);
}

.mobile-menu-close:hover {
  background: rgba(183, 138, 67, 0.10);
}


/* ==========================================================================
   19. MOBILE SEARCH
   ========================================================================== */

.mobile-search {
  position: relative;
  margin-top: 20px;
}

.mobile-search input {
  width: 100%;
  height: 50px;

  padding: 0 54px 0 15px;

  border: 1px solid var(--color-border);
  border-radius: 11px;
  outline: none;

  background: var(--color-bg-soft);
  color: var(--color-text);

  font-size: 12px;

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.mobile-search input::placeholder {
  color: var(--color-text-muted);
}

.mobile-search input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(183, 138, 67, 0.09);
}

.mobile-search button {
  position: absolute;
  top: 5px;
  right: 5px;

  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  padding: 0;
  border: 0;
  border-radius: 8px;

  background: #171717;
  color: #ffffff;

  cursor: pointer;
}

.mobile-search svg {
  width: 17px;
  height: 17px;
}


/* ==========================================================================
   20. MOBILE NAVIGATION
   ========================================================================== */

.mobile-nav {
  display: grid;
  margin-top: 20px;
}

.mobile-nav > a,
.mobile-nav-row {
  min-height: 55px;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav > a,
.mobile-nav-row > a {
  display: flex;
  align-items: center;

  color: var(--color-text);

  font-size: 14px;
  font-weight: 500;
}

.mobile-nav > a:hover,
.mobile-nav-row > a:hover {
  color: var(--color-gold-dark);
}

.mobile-nav-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.mobile-nav-row > a {
  height: 100%;
}

.mobile-submenu-toggle {
  width: 46px;
  height: 46px;

  display: grid;
  place-items: center;

  padding: 0;

  border: 0;
  border-radius: 9px;

  background: transparent;

  cursor: pointer;
}

.mobile-submenu-toggle:hover {
  background: rgba(183, 138, 67, 0.08);
}

.mobile-submenu-toggle span {
  transition: transform var(--transition-fast);
}

.mobile-submenu-toggle[aria-expanded="true"] span {
  transform: rotate(180deg);
}

.mobile-submenu {
  display: grid;

  padding: 6px 0 10px 16px;

  border-bottom: 1px solid var(--color-border);
}

.mobile-submenu[hidden] {
  display: none;
}

.mobile-submenu a {
  min-height: 42px;

  display: flex;
  align-items: center;

  padding-inline: 10px;

  border-radius: 8px;

  color: var(--color-text-secondary);

  font-size: 12px;
  font-weight: 500;

  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.mobile-submenu a:hover {
  background: var(--color-bg-soft);
  color: var(--color-gold-dark);
}


/* ==========================================================================
   21. MOBILE MENU ACTIONS
   ========================================================================== */

.mobile-menu-actions {
  display: grid;
  gap: 10px;

  margin-top: 25px;
}

.mobile-account-link,
.mobile-book-cta {
  min-height: 49px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  font-size: 12px;
  font-weight: 700;

  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.mobile-account-link {
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

.mobile-book-cta {
  gap: 12px;
  border: 1px solid var(--color-gold);
  background: #171717;
  color: #ffffff;
}

.mobile-account-link:hover,
.mobile-book-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}


/* ==========================================================================
   22. TEMPORARY FOUNDATION PAGE
   Remove/replace this once front-page.php is integrated.
   ========================================================================== */

.dermax-foundation-check {
  min-height: 60vh;

  display: grid;
  place-items: center;

  padding: 80px 20px;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(183, 138, 67, 0.08),
      transparent 30%
    ),
    var(--color-bg-soft);
}

.dermax-foundation-card {
  width: min(720px, 100%);

  padding: 42px;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);

  background: var(--color-surface);

  text-align: center;

  box-shadow: var(--shadow-sm);
}

.dermax-foundation-card h1 {
  margin: 0;

  color: var(--color-text);

  font-family: var(--font-heading);
  font-size: clamp(40px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.dermax-foundation-card p {
  max-width: 560px;

  margin: 16px auto 0;

  color: var(--color-text-secondary);

  font-size: 16px;
  line-height: 1.7;
}


/* ==========================================================================
   23. DESKTOP RESPONSIVE REFINEMENTS
   ========================================================================== */

@media (max-width: 1260px) {
  .header-main {
    grid-template-columns:
      minmax(190px, 220px)
      minmax(240px, 1fr)
      auto;

    gap: 18px;
  }

  .site-brand {
    width: 215px;
  }

  .header-search {
    max-width: 470px;
  }

  .header-actions {
    gap: 3px;
  }

  .header-actions .action-label {
    display: none;
  }

  .header-cta {
    padding-inline: 16px;
  }

  .nav-menu {
    gap: clamp(26px, 3.4vw, 46px);
  }
}

@media (max-width: 1030px) {
  .header-main {
    grid-template-columns:
      minmax(180px, 200px)
      minmax(220px, 1fr)
      auto;
  }

  .site-brand {
    width: 198px;
  }

  .header-search {
    max-width: 370px;
  }

  .header-cta {
    min-height: 44px;
    padding-inline: 14px;
    font-size: 11px;
  }

  .nav-menu {
    gap: 27px;
  }
}


/* ==========================================================================
   24. TABLET / MOBILE
   ========================================================================== */

@media (max-width: 900px) {
  .section {
    padding-block: var(--section-space-tablet);
  }

  .header-main,
  .site-header.scrolled .header-main {
    min-height: 74px;

    display: flex;
    justify-content: space-between;

    gap: 16px;
  }

  .site-brand,
  .site-header.scrolled .site-brand {
    width: 190px;
    height: 52px;
  }

  .header-search,
  .header-actions,
  .desktop-nav {
    display: none;
  }

  .mobile-header-actions {
    display: flex;
  }
}

/* WordPress mobile admin bar */
@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 650px) {
  :root {
    --page-padding: 20px;
  }

  .section {
    padding-block: var(--section-space-mobile);
  }

  .header-main,
  .site-header.scrolled .header-main {
    min-height: 70px;
  }

  .site-brand,
  .site-header.scrolled .site-brand {
    width: 168px;
    height: 46px;
  }

  .mobile-header-actions {
    gap: 0;
  }

  .theme-toggle,
  .mobile-cart-button,
  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .mobile-menu {
    padding: 20px;
  }

  .mobile-menu-brand {
    width: 180px;
    height: 46px;
  }

  .dermax-foundation-card {
    padding: 30px 22px;
  }
}

@media (max-width: 380px) {
  .site-brand,
  .site-header.scrolled .site-brand {
    width: 148px;
  }

  .mobile-menu-brand {
    width: 165px;
  }

  .theme-toggle {
    display: none;
  }
}


/* ==========================================================================
   25. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
