/* ==========================================================================
   SundartaGuide.com — Core Design System & Styling v2.0
   Aesthetic: Warm Luxury Skincare & Editorial Intelligence
   Dark/Light Mode: Full support via [data-theme] attribute
   ========================================================================== */

:root,
[data-theme="light"] {
  /* Light Mode — Warm Alabaster, Champagne Gold, Terracotta, Charcoal */
  --bg-primary: #FAF8F5;
  --bg-secondary: #F3EFE9;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #FDFBF7;
  --bg-input: #FFFFFF;
  
  --text-main: #1C1A18;
  --text-muted: #666059;
  --text-subtle: #968E85;
  
  --gold-primary: #C59B63;
  --gold-dark: #9F753E;
  --gold-light: #F4EAD8;
  --gold-glow: rgba(197, 155, 99, 0.25);
  
  --terracotta: #C96853;
  --terracotta-light: #FAECE8;

  --safe-green: #257953;
  --safe-green-bg: #EAF5EF;
  --warn-amber: #C07415;
  --warn-amber-bg: #FEF6EA;
  --danger-red: #B83B3B;
  --danger-red-bg: #FDEEEE;
  
  --border-color: #E8E1D7;
  --border-focus: #C59B63;

  --header-bg: rgba(250, 248, 245, 0.88);
  --header-border: rgba(232, 225, 215, 0.8);
  --drawer-bg: #FFFFFF;
  --overlay-text: rgba(255,255,255,0.92);
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(28, 26, 24, 0.04);
  --shadow-md: 0 8px 24px rgba(28, 26, 24, 0.07);
  --shadow-lg: 0 16px 40px rgba(28, 26, 24, 0.1);
  --shadow-gold: 0 10px 30px rgba(197, 155, 99, 0.2);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-pill: 9999px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg-primary: #0D0B0A;
  --bg-secondary: #161310;
  --bg-card: #1E1A17;
  --bg-card-subtle: #231E1A;
  --bg-input: #261F1A;

  --text-main: #F0EDE8;
  --text-muted: #B8AFA5;
  --text-subtle: #7A6F65;

  --gold-primary: #D4A853;
  --gold-dark: #F0C878;
  --gold-light: rgba(212,168,83,0.15);
  --gold-glow: rgba(212, 168, 83, 0.3);

  --terracotta: #D97B6A;
  --terracotta-light: rgba(201,104,83,0.18);

  --safe-green: #2FB374;
  --safe-green-bg: rgba(47,179,116,0.15);
  --warn-amber: #E09B30;
  --warn-amber-bg: rgba(224,155,48,0.15);
  --danger-red: #E05555;
  --danger-red-bg: rgba(224,85,85,0.15);

  --border-color: #2E2720;
  --border-focus: #D4A853;

  --header-bg: rgba(13, 11, 10, 0.92);
  --header-border: rgba(46, 39, 32, 0.9);
  --drawer-bg: #161310;
  --overlay-text: rgba(255,255,255,0.9);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 10px 30px rgba(212, 168, 83, 0.25);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-pill: 9999px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--header-border);
  transition: box-shadow var(--transition-fast), background var(--transition-normal), border-color var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .header-container {
    padding: 0.65rem 1rem;
    gap: 0.6rem;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-symbol {
  font-size: 1.5rem;
  color: var(--gold-primary);
  line-height: 1;
  animation: pulseGold 3s infinite ease-in-out;
}

@keyframes pulseGold {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.25rem;
  }
  .brand-symbol {
    font-size: 1.3rem;
  }
}

.brand-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  font-weight: 600;
}

@media (max-width: 480px) {
  .brand-tag {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }
}

.desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: block;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-secondary);
}

.nav-link.active {
  color: var(--text-main);
  background: var(--gold-light);
  font-weight: 600;
}

.nav-icon {
  font-size: 1rem;
  line-height: 1;
}

/* ── Mega Dropdown Navigation (Desktop) ── */
.has-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown-toggle .dropdown-caret {
  display: inline-block;
  font-size: 0.7rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.has-dropdown:hover .dropdown-caret,
.has-dropdown.open .dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: -100px;
  width: 900px;
  max-width: 92vw;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14), 0 6px 16px rgba(0, 0, 0, 0.06);
  padding: 1.75rem;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
}

/* Invisible bridge so moving mouse from button to menu doesn't close it */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 14px;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown,
.has-dropdown.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nav-dropdown-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1.5rem;
}

.dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dropdown-col-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid var(--border-color);
}

.dropdown-link {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: block;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-link:hover {
  color: var(--text-main);
  background: var(--bg-secondary);
  transform: translateX(4px);
}

/* ── Header Actions (Theme Toggle, CTA, Mobile Hamburger) ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--gold-primary);
  background: var(--gold-light);
  transform: translateY(-1px);
}

.theme-toggle-btn .theme-icon {
  font-size: 1rem;
  line-height: 1;
}

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--text-main);
  color: var(--bg-primary);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-header-cta:hover {
  background: var(--gold-dark);
  color: #FFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-arrow {
  transition: transform var(--transition-fast);
}

.btn-header-cta:hover .btn-arrow {
  transform: translateX(3px);
}

@media (max-width: 860px) {
  .btn-header-cta {
    display: none; /* Hide long button on tablet/mobile so header stays sleek */
  }
}

@media (max-width: 480px) {
  .theme-toggle-btn .theme-label {
    display: none; /* Icon-only on mobile phones for compact fit */
  }
  .theme-toggle-btn {
    padding: 0.5rem;
    width: 38px;
    height: 38px;
    justify-content: center;
  }
}

/* ── Mobile Hamburger Button ── */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: var(--gold-light);
  border-color: var(--gold-primary);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ── Mobile Drawer Navigation (Fast & Smooth GPU Animation) ── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 88vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-card);
  z-index: 2100;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  overflow: hidden;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 16, 14, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  flex-shrink: 0;
}

.drawer-close-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  line-height: 1;
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover {
  color: var(--text-main);
  background: var(--gold-light);
}

/* Drawer Instant Search & Category Chips */
.drawer-search-wrap {
  padding: 0.85rem 1.25rem 0.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.drawer-search-input {
  width: 100%;
  padding: 0.65rem 0.95rem 0.65rem 2.2rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}

.drawer-search-input:focus {
  border-color: var(--gold-primary);
}

.drawer-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-subtle);
  pointer-events: none;
  line-height: 1;
}

.drawer-cats-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 0 0.2rem;
  scrollbar-width: none;
}
.drawer-cats-scroll::-webkit-scrollbar {
  display: none;
}

.drawer-cat-pill {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.drawer-cat-pill.active,
.drawer-cat-pill:hover {
  background: var(--gold-primary);
  color: #FFF;
  border-color: var(--gold-primary);
}

.mobile-drawer-body {
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.mobile-menu-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: var(--gold-light);
  border-color: var(--gold-primary);
  transform: translateX(3px);
}

.mobile-nav-link .tool-emoji {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.mobile-nav-link .link-meta {
  flex: 1;
}

.mobile-nav-link .link-meta strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.25;
}

.mobile-nav-link .link-meta small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.mobile-nav-link .link-chevron {
  font-size: 0.85rem;
  color: var(--text-subtle);
  transition: transform var(--transition-fast);
}

.mobile-nav-link:hover .link-chevron {
  color: var(--gold-primary);
  transform: translateX(2px);
}

.mobile-drawer-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.4rem 0;
}

.mobile-subnav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-subnav a {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.4rem 0.2rem;
  display: block;
  transition: color var(--transition-fast);
}

.mobile-subnav a:hover {
  color: var(--gold-primary);
}

/* ── Mobile Sticky Bottom App Bar (App-like 1-Thumb Navigation) ── */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 68px; /* Space for sticky bottom bar */
  }

  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    z-index: 1050;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .bottom-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    user-select: none;
    cursor: pointer;
  }

  .bottom-bar-item .bottom-bar-icon {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform var(--transition-fast);
  }

  .bottom-bar-item:hover,
  .bottom-bar-item.active {
    color: var(--gold-dark);
  }

  .bottom-bar-item:hover .bottom-bar-icon,
  .bottom-bar-item.active .bottom-bar-icon {
    transform: translateY(-2px);
  }
}

/* ==========================================================================
   Hero Section & Layouts
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 4rem 0 3.5rem;
  background: linear-gradient(180deg, rgba(244, 234, 216, 0.45) 0%, rgba(250, 248, 245, 1) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-badge-wrap {
  margin-bottom: 1.2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-dark);
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 1.2rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.6rem;
  }
}

.hero-title .highlight {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-dark);
  background: linear-gradient(120deg, var(--gold-dark) 0%, var(--terracotta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  font-size: 0.98rem;
  font-weight: 600;
  background: var(--text-main);
  color: #FFF;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  font-size: 0.98rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-subtle);
  transform: translateY(-2px);
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.hero-image-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.hero-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-image-card:hover img {
  transform: scale(1.03);
}

.hero-floating-pill {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pill-icon {
  font-size: 1.5rem;
}

.pill-text strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-main);
}

.pill-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Tool Cards Grid (Homepage Hub)
   ========================================================================== */
.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.8rem;
  }
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-primary);
}

.tool-card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.tool-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.tool-card:hover .tool-card-media img {
  transform: scale(1.05);
}

.tool-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(28, 26, 24, 0.85);
  color: #FFF;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.tool-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--gold-dark);
}

.tool-card-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.tool-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tool-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.feature-pill {
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  background: var(--bg-secondary);
  color: var(--text-main);
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-dark);
  transition: gap var(--transition-fast);
}

.tool-card:hover .tool-card-link {
  gap: 0.75rem;
  color: var(--text-main);
}

/* ==========================================================================
   Tool Page Specific Styles: Universal Layout
   ========================================================================== */
.tool-hero {
  padding: 3rem 0 2.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.tool-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.tool-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--gold-light);
  color: var(--gold-dark);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.tool-page-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.8rem;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .tool-page-title {
    font-size: 3.2rem;
  }
}

.tool-page-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

/* Tool Interactive Shell Card */
.tool-workspace {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2.2rem;
  margin-top: -2.5rem;
  position: relative;
  z-index: 10;
}

@media (max-width: 768px) {
  .tool-workspace {
    padding: 1.5rem;
    margin-top: -1.5rem;
  }
}

/* ==========================================================================
   Tool 1: Ingredient Checker Component
   ========================================================================== */
.ingredient-input-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ingredient-textarea {
  width: 100%;
  min-height: 160px;
  padding: 1.2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  resize: vertical;
  transition: all var(--transition-fast);
}

.ingredient-textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
  background: #FFF;
}

.sample-pills-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.sample-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-sample-tag {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.btn-sample-tag:hover {
  background: var(--gold-light);
  border-color: var(--gold-primary);
  color: var(--gold-dark);
}

.ingredient-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.btn-analyze {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2.2rem;
  background: var(--text-main);
  color: #FFF;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.btn-analyze:hover {
  background: var(--gold-dark);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.btn-clear {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-clear:hover {
  color: var(--danger-red);
}

/* Ingredient Results Output */
.analysis-results-card {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: none; /* revealed via JS */
}

.analysis-results-card.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-summary-banner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

@media (min-width: 768px) {
  .results-summary-banner {
    grid-template-columns: auto 1fr auto;
  }
}

.safety-score-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  border: 4px solid;
  margin: 0 auto;
}

.safety-score-circle small {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-safe {
  border-color: var(--safe-green);
  color: var(--safe-green);
  background: var(--safe-green-bg);
}

.score-moderate {
  border-color: var(--warn-amber);
  color: var(--warn-amber);
  background: var(--warn-amber-bg);
}

.score-danger {
  border-color: var(--danger-red);
  color: var(--danger-red);
  background: var(--danger-red-bg);
}

.results-summary-text h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.results-summary-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.results-share-btns {
  display: flex;
  gap: 0.6rem;
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.btn-action-icon:hover {
  background: var(--gold-light);
  border-color: var(--gold-primary);
}

/* Ingredient Metric Stats */
.ingredient-breakdown-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.metric-pill-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.metric-pill-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.metric-pill-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Ingredient List Table / Cards */
.ingredient-cards-stream {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.ingredient-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  transition: border-color var(--transition-fast);
}

.ingredient-item-row:hover {
  border-color: var(--gold-primary);
}

.ingredient-meta-col {
  display: flex;
  flex-direction: column;
}

.ingredient-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.ingredient-role-tag {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 2px;
}

.ingredient-badges-col {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.badge-comedogenic {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.rating-0 { background: #EAF5EF; color: #206F48; }
.rating-1 { background: #EDF7F1; color: #2B7853; }
.rating-2 { background: #FEF9EB; color: #9A6F14; }
.rating-3 { background: #FEF2E4; color: #B35C15; }
.rating-4 { background: #FDEEEE; color: #B33939; }
.rating-5 { background: #FBDEE0; color: #941B22; }

.badge-fungal-safe {
  background: #EAF5EF;
  color: #206F48;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-fungal-trigger {
  background: #FDEEEE;
  color: #B33939;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==========================================================================
   Tool 2: Skin Undertone & Color Palette Matcher
   ========================================================================== */
.quiz-progress-bar-container {
  margin-bottom: 2rem;
}

.quiz-step-indicator {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

.quiz-progress-track {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--gold-primary), var(--terracotta));
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.quiz-step-card {
  display: none;
}

.quiz-step-card.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.quiz-question-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.quiz-question-hint {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .quiz-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quiz-option-btn {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 1.4rem;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.quiz-option-btn:hover {
  border-color: var(--gold-primary);
  background: #FFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.quiz-option-btn.selected {
  border-color: var(--gold-primary);
  background: var(--gold-light);
  box-shadow: var(--shadow-md);
}

.option-emoji {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.option-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.option-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Undertone Results Visual Palette */
.undertone-result-box {
  display: none;
  margin-top: 2rem;
  animation: fadeIn 0.5s ease;
}

.undertone-result-box.active {
  display: block;
}

.undertone-hero-result {
  text-align: center;
  padding: 2.5rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
}

.undertone-tag-pill {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.undertone-type-name {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.undertone-summary-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

.swatch-group-section {
  margin-top: 2rem;
}

.swatch-group-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.swatch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.swatch-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.swatch-color-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto 0.6rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid #FFF;
}

.swatch-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.swatch-hex {
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-family: monospace;
}

/* ==========================================================================
   Tool 3: Pantry DIY Skincare Generator
   ========================================================================== */
.pantry-selection-zone {
  margin-bottom: 2rem;
}

.pantry-category-title {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.pantry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 0.75rem;
}

.pantry-item-check {
  display: none;
}

.pantry-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  user-select: none;
}

.pantry-chip:hover {
  border-color: var(--gold-primary);
  background: #FFF;
}

.pantry-item-check:checked + .pantry-chip {
  background: var(--gold-light);
  border-color: var(--gold-primary);
  color: var(--gold-dark);
  box-shadow: var(--shadow-sm);
}

.pantry-chip-icon {
  font-size: 1.1rem;
}

/* Recipe Results Box */
.diy-recipe-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
}

.recipe-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.2rem;
  margin-bottom: 1.5rem;
}

.recipe-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.recipe-concern-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--terracotta-light);
  color: var(--terracotta);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.recipe-ingredients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.recipe-ingredients-list li {
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.recipe-steps-list {
  padding-left: 1.2rem;
  margin-bottom: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.recipe-steps-list li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.patch-test-alert {
  padding: 1rem 1.2rem;
  background: var(--warn-amber-bg);
  border-left: 4px solid var(--warn-amber);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #79480C;
}

/* ==========================================================================
   Tool 4: Face Shape & Hairstyle Stylist
   ========================================================================== */
.face-shape-slider-box {
  margin-bottom: 1.5rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.custom-range-slider {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-pill);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Styling recommendation cards */
.face-style-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .face-style-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.style-recommendation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.style-rec-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.style-rec-icon {
  font-size: 1.4rem;
}

.style-rec-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.style-rec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.style-rec-list li {
  font-size: 0.92rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.style-rec-list li::before {
  content: "✔";
  color: var(--safe-green);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* ==========================================================================
   Editorial & Educational Section (High E-E-A-T & Google Safe)
   ========================================================================== */
.editorial-section {
  padding: 4.5rem 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .editorial-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.editorial-content h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.editorial-content p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.editorial-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.8rem 0;
}

.editorial-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.98rem;
  color: var(--text-main);
  font-weight: 500;
}

.check-icon {
  color: var(--gold-dark);
  font-weight: 700;
}

/* FAQ Accordion Component */
.faq-section {
  padding: 4.5rem 0;
  background: var(--bg-primary);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
}

.faq-toggle-icon {
  font-size: 1.2rem;
  color: var(--gold-dark);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   AdSense & Affiliate Banner Placeholder
   ========================================================================== */
.ad-slot-wrapper {
  margin: 2.5rem 0;
  padding: 1.25rem;
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
}

.ad-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 0.75rem;
}

.ad-placeholder-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.ad-mock-icon {
  font-size: 1.6rem;
  color: var(--gold-primary);
}

.ad-mock-text {
  text-align: left;
  max-width: 480px;
}

.ad-mock-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
}

.ad-mock-text span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ad-mock-btn {
  padding: 0.5rem 1rem;
  background: var(--gold-light);
  color: var(--gold-dark);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.ad-mock-btn:hover {
  background: var(--gold-dark);
  color: #FFF;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #141312;
  color: #E8E5DF;
  margin-top: auto;
  border-top: 1px solid #2B2824;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 600px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-container {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}

.footer-about .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 0.8rem;
}

.footer-mission {
  font-size: 0.88rem;
  color: #A6A097;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.footer-trust-badges {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.trust-badge {
  font-size: 0.78rem;
  color: var(--gold-primary);
}

.footer-heading {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFF;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a {
  font-size: 0.88rem;
  color: #A6A097;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--gold-primary);
}

.newsletter-sub {
  font-size: 0.85rem;
  color: #A6A097;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.footer-newsletter-form .input-group {
  display: flex;
  background: #201E1B;
  border: 1px solid #38342E;
  border-radius: var(--radius-pill);
  padding: 4px;
}

.footer-newsletter-form input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 0.5rem 0.9rem;
  color: #FFF;
  font-size: 0.88rem;
  outline: none;
}

.btn-subscribe {
  padding: 0.5rem 1.1rem;
  background: var(--gold-primary);
  color: #141312;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
}

.btn-subscribe:hover {
  background: #FFF;
}

.newsletter-status {
  font-size: 0.78rem;
  margin-top: 0.5rem;
  color: var(--safe-green);
}

.footer-disclaimer-bar {
  background: #0E0D0C;
  border-top: 1px solid #201E1B;
  border-bottom: 1px solid #201E1B;
  padding: 1.25rem 1.5rem;
}

.disclaimer-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.disclaimer-inner p {
  font-size: 0.75rem;
  color: #7A746B;
  line-height: 1.5;
}

.disclaimer-inner strong {
  color: #A6A097;
}

.footer-bottom {
  padding: 1.25rem 1.5rem;
  background: #0E0D0C;
}

.footer-bottom-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #7A746B;
}

.back-to-top {
  color: #A6A097;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition-fast);
}

.back-to-top:hover {
  color: var(--gold-primary);
}

/* ==========================================================================
   Toast Notification & Utilities
   ========================================================================== */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text-main);
  color: #FFF;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 3000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   v2.0 — Dark Mode Compatibility Fixes
   ========================================================================== */
body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.tool-card,
.card,
.result-panel,
.ingredients-input-area,
.quiz-section,
.quiz-card,
.analyzer-card,
.result-card {
  background: var(--bg-card);
  border-color: var(--border-color);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

input, textarea, select {
  background: var(--bg-input);
  color: var(--text-main);
  border-color: var(--border-color);
  transition: background var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
}

/* ==========================================================================
   v2.0 — Theme Toggle Button
   ========================================================================== */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  letter-spacing: 0.02em;
}

.theme-toggle-btn:hover {
  background: var(--gold-light);
  border-color: var(--gold-primary);
  color: var(--gold-dark);
}

.theme-toggle-btn .theme-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.theme-toggle-btn .theme-label {
  display: none;
}

@media (min-width: 640px) {
  .theme-toggle-btn .theme-label {
    display: inline;
  }
}

/* ==========================================================================
   v2.0 — Tool Hub: Category Filter Bar
   ========================================================================== */
.tools-hub-section {
  padding: 4rem 0 6rem;
}

.tools-hub-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.hub-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.8rem;
  line-height: 1.1;
}

.hub-title span {
  color: var(--gold-primary);
}

.hub-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
  padding: 0 1rem;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-dark);
  background: var(--gold-light);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #fff;
  box-shadow: var(--shadow-gold);
}

[data-theme="dark"] .filter-btn.active {
  color: #0D0B0A;
}

/* ==========================================================================
   v2.0 — Tool Hub: Grid Layout
   ========================================================================== */
.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

@media (min-width: 1200px) {
  .tools-hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hub-tool-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.hub-tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  opacity: 0;
  background: linear-gradient(135deg, var(--gold-glow), transparent);
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.hub-tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-primary);
}

.hub-tool-card:hover::before {
  opacity: 1;
}

.hub-tool-card[data-hidden="true"] {
  display: none;
}

.hub-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.hub-card-image-placeholder {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--bg-secondary);
}

.hub-card-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hub-card-category {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  background: var(--gold-light);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.hub-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.hub-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.hub-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.4rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.hub-card-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.02em;
  transition: gap var(--transition-fast);
}

.hub-tool-card:hover .hub-card-cta {
  gap: 0.6rem;
}

.hub-card-meta {
  font-size: 0.72rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ==========================================================================
   v2.0 — Breadcrumb Navigation
   ========================================================================== */
.breadcrumb-nav {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.breadcrumb-list li:not(:last-child)::after {
  content: '›';
  color: var(--text-subtle);
}

.breadcrumb-list a {
  color: var(--gold-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-list a:hover {
  color: var(--gold-primary);
}

.breadcrumb-list li:last-child {
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   v2.0 — Progress Ring Component
   ========================================================================== */
.progress-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--gold-primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.2; /* 2π × 40 */
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-ring-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.progress-ring-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   v2.0 — Enhanced Quiz & Tool Styles
   ========================================================================== */
.quiz-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .quiz-option-grid {
    grid-template-columns: 1fr;
  }
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.quiz-option-btn:hover {
  border-color: var(--gold-primary);
  background: var(--gold-light);
  transform: translateY(-2px);
}

.quiz-option-btn.selected {
  border-color: var(--gold-primary);
  background: var(--gold-light);
  color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.quiz-option-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Units Toggle */
.unit-toggle-group {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 3px;
  width: fit-content;
}

.unit-btn {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.unit-btn.active {
  background: var(--gold-primary);
  color: #fff;
}

[data-theme="dark"] .unit-btn.active {
  color: #0D0B0A;
}

/* Result Swatches */
.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.1);
  border-color: var(--text-main);
}

.color-swatch .swatch-name {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  white-space: nowrap;
  color: var(--text-subtle);
  font-weight: 500;
}

/* Swatch row layout */
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.swatch-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--bg-card);
  outline: 1.5px solid var(--border-color);
}

.swatch-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 70px;
}

/* ==========================================================================
   v2.0 — Stats Banner (used on index page)
   ========================================================================== */
.stats-banner {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-primary);
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.35rem;
  display: block;
}

/* ==========================================================================
   v2.0 — Mobile drawer dark mode fix
   ========================================================================== */
.mobile-drawer {
  background: var(--drawer-bg) !important;
  transition: background var(--transition-normal);
}

/* ==========================================================================
   v2.0 — Input / select dark mode fixes
   ========================================================================== */
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

[data-theme="dark"] .btn-gold {
  background: linear-gradient(135deg, #D4A853 0%, #B8893A 100%);
  color: #0D0B0A;
}

[data-theme="dark"] .tool-result-section {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .result-badge {
  background: var(--bg-secondary);
}

/* ==========================================================================
   v2.0 — Category Section Dividers
   ========================================================================== */
.category-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-section-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.category-section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
}

.category-section-line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
