/* ----------------------------------------------------
   GLOBAL STYLES & FLUID TYPOGRAPHY
   WA Nails & Beauty Supply
   ---------------------------------------------------- */

/* --- TYPOGRAPHY FLUID SCALING (MOBILE FIRST) --- */
h1 {
  font-size: clamp(2rem, 5vw, 3rem); /* 32px to 48px */
  line-height: var(--line-height-heading);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -1.5%;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem); /* 24px to 32px */
  line-height: var(--line-height-heading);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -1%;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem); /* 20px to 24px */
  line-height: var(--line-height-heading);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.5%;
}

h4 {
  font-size: 1.25rem; /* 20px */
  line-height: var(--line-height-heading);
  font-weight: 500;
  color: var(--color-text-primary);
  letter-spacing: 0;
}

body, p {
  font-size: 1rem; /* 16px */
  line-height: var(--line-height-body);
  font-weight: 400;
  color: var(--color-text-secondary);
}

.body-small {
  font-size: 0.875rem; /* 14px */
  line-height: 1.57;
}

.caption {
  font-size: 0.75rem; /* 12px */
  line-height: 1.5;
  font-weight: 300;
  color: var(--color-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* --- STRUCTURE & WRAPPER --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-m);
  padding-right: var(--space-m);
}

/* --- FLEX/GRID UTILITIES (MOBILE FIRST) --- */
.grid {
  display: grid;
  gap: var(--space-m);
}

.flex {
  display: flex;
  gap: var(--space-m);
}

/* --- BUTTON COMPONENTS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  min-height: 44px; /* A11y Tap Target */
}

.btn--primary {
  background: var(--gradient-primary);
  color: var(--color-pure-white);
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn--primary:active {
  transform: translateY(0);
  background: #C9362E;
}

.btn--primary:disabled {
  opacity: 0.5;
  pointer-events: none;
  background: var(--color-border);
  color: var(--color-text-muted);
}

.btn--secondary {
  background: var(--color-pure-white);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.btn--secondary:hover {
  border-color: var(--color-peach-orange);
  color: var(--color-coral-red);
  background: var(--color-warm-ivory);
}

.btn--ghost {
  background: transparent;
  color: var(--color-coral-red);
  padding-left: 0;
  padding-right: 0;
}

.btn--ghost:hover {
  color: #C9362E;
  text-decoration: underline;
}

/* --- BADGE COMPONENTS --- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 0.75rem; /* 12px */
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge--sale {
  background-color: var(--color-coral-red);
  color: var(--color-pure-white);
}

.badge--new {
  background-color: var(--color-warm-ivory);
  color: var(--color-coral-red);
  border: 1px solid var(--color-soft-peach);
}

.badge--stock {
  background-color: #EAF7EC;
  color: #2E7D32;
  text-transform: none;
  font-weight: 500;
  border-radius: 20px; /* Pill style */
}

/* --- TOPIC FILTER PILLS --- */
.topic-filter {
  display: flex;
  gap: var(--space-s);
  overflow-x: auto;
  padding-bottom: var(--space-s);
  margin-bottom: var(--space-xl);
  scrollbar-width: none; /* Hide scrollbar for standard Firefox */
}

.topic-filter::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.topic-pill {
  padding: 8px 18px;
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  border-radius: 30px;
  border: 1px solid var(--color-border);
  background-color: var(--color-pure-white);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.topic-pill:hover,
.topic-pill--active {
  background-color: var(--color-coral-red);
  border-color: var(--color-coral-red);
  color: var(--color-pure-white);
  box-shadow: var(--shadow-soft);
}

/* --- BLOG/KNOWLEDGE CARD GRID --- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-l);
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--gradient-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  border: 1px solid var(--color-border);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
}

.blog-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--color-light-nude);
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.blog-card:hover .blog-card__image {
  transform: scale(1.05);
}

.blog-card__content {
  padding: var(--space-l);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: var(--space-s);
  font-size: 0.75rem; /* 12px */
  color: var(--color-text-muted);
}

.blog-card__meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-text-muted);
}

.blog-card__title {
  font-size: 1.25rem; /* 20px */
  line-height: var(--line-height-heading);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-s);
  transition: var(--transition-fast);
}

.blog-card__title a:hover {
  color: var(--color-coral-red);
}

.blog-card__excerpt {
  font-size: 0.875rem; /* 14px */
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-l);
  flex-grow: 1;
}

.blog-card__footer {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-m);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- AFFILIATE PRODUCT GRID & CARDS (20% SHOP) --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile for better space utilization */
  gap: var(--space-m);
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-l);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.product-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--color-pure-white);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-m);
}

.product-card__img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.product-card:hover .product-card__img {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
}

.product-card__brand {
  font-size: 0.75rem; /* 12px */
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.product-card__title {
  font-size: 0.9375rem; /* ~15px */
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text-primary);
  margin-bottom: var(--space-s);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em; /* Force height constraint for alignment */
  flex-grow: 1;
}

.product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}

.product-card__price-new {
  font-size: 1.0625rem; /* 17px */
  font-weight: 700;
  color: var(--color-coral-red);
}

.product-card__price-old {
  font-size: 0.8125rem; /* 13px */
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.product-card__btn {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.75rem; /* 12px */
  font-weight: 700;
  border-radius: 4px;
  background: var(--gradient-primary);
  color: var(--color-pure-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  min-height: 40px; /* Comfort target */
}

.product-card__btn:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
}

.product-card__btn:active {
  background: #C9362E;
  transform: translateY(0);
}

/* --- PILLAR ARTICLE & EEAT TYPOGRAPHY (SINGLE.PHP) --- */
.article-container {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-xxl) var(--space-m);
}

.article-header {
  margin-bottom: var(--space-xl);
  text-align: center;
}

.article-header__title {
  font-size: clamp(2.25rem, 6vw, 3.5rem); /* Beautiful fluid scale for title */
  margin-bottom: var(--space-m);
}

.article-header__meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-s);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.article-body {
  font-size: 1.125rem; /* Large, comfortable text size (18px) for readability */
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.article-body p {
  margin-bottom: var(--space-l);
  font-size: 1.125rem;
  line-height: 1.8;
}

.article-body h2 {
  margin-top: var(--space-xxl);
  margin-bottom: var(--space-m);
}

.article-body h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-m);
}

.article-body img {
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  margin: var(--space-xl) auto;
}

/* --- EEAT AUTHOR BIO BOX --- */
.author-box {
  background: var(--color-pure-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-l);
  margin-top: var(--space-xxl);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  align-items: center;
}

@media (min-width: 576px) {
  .author-box {
    flex-direction: row;
    align-items: flex-start;
  }
}

.author-box__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--color-light-nude);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 2px solid var(--color-coral-red);
  flex-shrink: 0;
}

.author-box__content {
  flex-grow: 1;
}

.author-box__name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.author-box__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-coral-red);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-s);
}

.author-box__desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

/* --- ARTICLE PRODUCTS RECOMMENDATION --- */
.article-supplies {
  background-color: var(--color-warm-ivory);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-xl) var(--space-m);
  margin: var(--space-xxl) 0;
  border-radius: 8px;
}

.article-supplies__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-l);
  text-align: center;
}

/* --- BREADCRUMBS --- */
.breadcrumbs {
  background-color: transparent;
  padding: var(--space-m) 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-l);
}

.breadcrumbs a {
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--color-coral-red);
  text-decoration: underline;
}

.breadcrumbs__separator {
  color: var(--color-border);
}

.breadcrumbs__current {
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- INTERACTIVE NAIL DIAGNOSTIC QUIZ --- */
.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--space-m);
}

.quiz-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-m);
  margin-bottom: var(--space-l);
}

.quiz-option-btn {
  background: var(--color-pure-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-m) var(--space-l);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.quiz-option-btn:hover {
  border-color: var(--color-coral-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  background-color: var(--color-warm-ivory);
}

.quiz-option-btn--active {
  border-color: var(--color-coral-red);
  background-color: var(--color-soft-peach);
  color: var(--color-coral-red);
  box-shadow: var(--shadow-medium);
}

.quiz-result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.quiz-routine-box, .quiz-supplies-box {
  background: var(--color-pure-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  box-shadow: var(--shadow-soft);
}

.quiz-routine-days {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-m);
}

@media (min-width: 768px) {
  .quiz-routine-days {
    grid-template-columns: 1fr 1fr;
  }
  .quiz-routine-day-card:nth-child(5) {
    grid-column: 1 / -1;
  }
}

.quiz-routine-day-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  background-color: var(--color-warm-ivory);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-m);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.quiz-routine-day-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-coral-red);
  box-shadow: var(--shadow-soft);
}

.quiz-routine-day-badge {
  background-color: var(--color-soft-peach);
  color: var(--color-coral-red);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  width: fit-content;
  white-space: nowrap;
}

.quiz-routine-day-text {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.quiz-routine-day-text strong {
  display: block;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.quiz-supplies-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-l);
}

@media (min-width: 768px) {
  .quiz-supplies-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* --- SKIN TONE & NAIL SHAPE VISUALIZER --- */
.visualizer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xxl);
  align-items: center;
}

@media (min-width: 768px) {
  .visualizer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.visualizer-panel {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  box-shadow: var(--shadow-medium);
}

.visualizer-control-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.visualizer-shape-pill {
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background-color: var(--color-pure-white);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.visualizer-shape-pill:hover,
.visualizer-shape-pill--active {
  background-color: var(--color-coral-red);
  border-color: var(--color-coral-red);
  color: var(--color-pure-white);
  box-shadow: var(--shadow-soft);
}

.visualizer-colors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-s);
}

.visualizer-color-pill {
  background: var(--color-pure-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-s);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  box-shadow: var(--shadow-soft);
}

.visualizer-color-pill:hover,
.visualizer-color-pill--active {
  border-color: var(--color-coral-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.visualizer-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.visualizer-color-dot--rainbow {
  background: conic-gradient(#ff0000, #ff8000, #ffff00, #00ff00, #0080ff, #8000ff, #ff0080, #ff0000);
  border: 2px solid rgba(255, 255, 255, 0.6);
  position: relative;
}

.visualizer-color-pill--custom {
  position: relative;
}

.visualizer-color-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: center;
}

.visualizer-product-card {
  background: var(--color-pure-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-m);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: var(--space-m);
  align-items: center;
}

.visualizer-product-img {
  width: 55px;
  height: 55px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.visualizer-product-info {
  flex: 1;
}

.visualizer-product-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 2px 0;
  line-height: 1.3;
}

.visualizer-product-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-coral-red);
  margin-bottom: var(--space-xs);
}

.visualizer-product-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-coral-red);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.visualizer-product-btn:hover {
  text-decoration: underline;
  color: #C9362E;
}

.visualizer-render-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
  padding: var(--space-xl) 0;
}

.visualizer-hand {
  position: relative;
  width: 100%;
  max-width: 420px; /* Perfect square canvas width increased by 10% */
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visualizer-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Dynamic 3D Vector Skin Tone Variable Sets */
.visualizer-hand[data-skintone="fair"] {
  --hand-skin-tone: #F5CAD2;
  --hand-skin-light: #FFF2F4;
}

.visualizer-hand[data-skintone="medium"] {
  --hand-skin-tone: #DCA180;
  --hand-skin-light: #F6E6DE;
}

.visualizer-hand[data-skintone="olive"] {
  --hand-skin-tone: #B27453;
  --hand-skin-light: #DCA98C;
}

.visualizer-hand[data-skintone="deep"] {
  --hand-skin-tone: #7C4629;
  --hand-skin-light: #A67357;
}

/* SVG Vector Dynamic Nail Swapping Styles */
.visualizer-hand.shape-almond .nail-shape.almond { display: block; }
.visualizer-hand.shape-oval .nail-shape.oval { display: block; }
.visualizer-hand.shape-square .nail-shape.square { display: block; }
.visualizer-hand.shape-coffin .nail-shape.coffin { display: block; }

.nail-shape {
  display: none;
  animation: nailFade 0.3s ease;
}

@keyframes nailFade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --- DYNAMIC TUTORIAL SUPPLIES CHECKLIST --- */
.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-pure-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-m);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-soft);
  gap: var(--space-m);
}

.checklist-item:hover {
  border-color: var(--color-peach-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.checklist-item--checked {
  background-color: #F4F9F4 !important;
  border-color: #A3D1A3 !important;
  opacity: 0.65;
}

.checklist-item--checked .checklist-item-title {
  text-decoration: line-through;
  color: var(--color-text-muted) !important;
}

.checklist-checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  accent-color: #2E7D32;
  transition: var(--transition-fast);
}

.checklist-single-buy-btn:hover {
  background-color: var(--color-warm-ivory) !important;
  border-color: var(--color-coral-red) !important;
  color: var(--color-coral-red) !important;
}

.checklist-summary-box {
  transition: var(--transition-smooth);
}

.checklist-summary-btn--all-checked {
  background: #2E7D32 !important;
  pointer-events: none;
  opacity: 0.9;
}

/* --- BEFORE/AFTER IMAGE COMPARISON SLIDER --- */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 650px;
  margin: var(--space-xl) auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
  user-select: none;
}

.ba-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-slider__resize {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid var(--color-pure-white);
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  transition: width 0.1s ease;
}

.ba-slider__range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 10;
  margin: 0;
  padding: 0;
}

.ba-slider__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  z-index: 5;
  pointer-events: none;
  transition: left 0.1s ease;
}

.ba-slider__handle::after {
  content: "↔";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background-color: var(--color-coral-red);
  border: 3px solid var(--color-pure-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-pure-white);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-medium);
}

/* --- PREMIUM TOGGLE SWITCH --- */
.switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--color-pure-white);
  transition: .3s;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}

.switch-toggle input:checked + .switch-slider {
  background-color: var(--color-coral-red);
}

.switch-toggle input:checked + .switch-slider::before {
  transform: translateX(22px);
}

/* --- AUTOMATED TABLE OF CONTENTS (TOC) --- */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.toc-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
  display: inline-flex;
  padding-left: 12px;
  border-left: 2px solid transparent;
}

.toc-link--h3 {
  padding-left: 28px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.toc-link:hover,
.toc-link--active {
  color: var(--color-coral-red) !important;
  border-left-color: var(--color-coral-red);
  font-weight: 700;
}

/* --- 1-MINUTE QUICK READ TRANSITION SHIELD --- */
.article-body p {
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.4s ease, 
              margin 0.45s cubic-bezier(0.4, 0, 0.2, 1), 
              padding 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s ease;
  opacity: 1;
  max-height: 900px;
  overflow: hidden;
}

.article-body.quick-read-active p:not(.quick-read-highlight) {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
}

.quick-read-highlight,
.article-body.quick-read-active p.quick-read-highlight {
  max-height: 900px !important;
  opacity: 1 !important;
  border-left: 3px solid var(--color-coral-red);
  padding-left: var(--space-s);
  font-weight: 600;
  color: var(--color-text-primary) !important;
  transform: none !important;
  margin-bottom: var(--space-l) !important;
}

.article-body.quick-read-active h2,
.article-body.quick-read-active h3,
.article-body.quick-read-active ul,
.article-body.quick-read-active ol,
.article-body.quick-read-active blockquote,
.article-body.quick-read-active .article-supplies {
  border-left: 3px solid var(--color-coral-red);
  padding-left: var(--space-m);
  transition: border-left 0.3s ease, padding-left 0.3s ease;
}

/* --- MULTI-COLUMN ARTICLE GRID FOR DESKTOP STICKY TOC --- */
@media (min-width: 1200px) {
  .article-container {
    max-width: 1140px; /* Expanded from 800px on desktop to accommodate sidebar without squishing content */
  }

  .article-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px; /* Content on the left, sticky TOC on the right */
    gap: var(--space-xxl);
    align-items: start;
  }

  .article-body {
    grid-column: 1;
    grid-row: 1; /* Force both content and TOC to row 1, preventing vertical offset stack */
    max-width: 760px; /* Keep standard maximum comfortable reading width */
  }
  
  .article-toc-box {
    grid-column: 2;
    grid-row: 1; /* Force both content and TOC to row 1, aligning their tops perfectly */
    position: sticky;
    top: 100px;
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 10;
    margin-bottom: 0 !important; /* Sidebar layout, no margin bottom needed */
  }

  #btn-toggle-toc {
    display: none !important;
  }
}

/* --- Golden Readability Typography Width --- */
.article-body p {
  max-width: 680px;
}

/* --- 3-THEME PALETTE VARIABLE MAPPINGS --- */
body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Theme 2: Sepia Theme override */
body.theme-sepia {
  background-color: #F4ECD8 !important;
  color: #433422 !important;
}

body.theme-sepia .header,
body.theme-sepia .footer,
body.theme-sepia .trending-bar,
body.theme-sepia .contact-form-wrapper,
body.theme-sepia .article-toc-box,
body.theme-sepia .quiz-routine-box,
body.theme-sepia .quiz-supplies-box,
body.theme-sepia .author-box,
body.theme-sepia .checklist-item,
body.theme-sepia .visualizer-product-card {
  background-color: #FAF5E8 !important;
  border-color: #E4D5B7 !important;
  color: #433422 !important;
}

body.theme-sepia .article-supplies,
body.theme-sepia .contact-container,
body.theme-sepia .visualizer-panel,
body.theme-sepia .checklist-summary-box,
body.theme-sepia .reader-control-panel {
  background: linear-gradient(135deg, #FAF5E8 0%, #F4ECD8 100%) !important;
  border-color: #E4D5B7 !important;
}

body.theme-sepia p,
body.theme-sepia span,
body.theme-sepia li,
body.theme-sepia a:not(.btn):not(.product-card__btn) {
  color: #5C4A36 !important;
}

body.theme-sepia h1,
body.theme-sepia h2,
body.theme-sepia h3,
body.theme-sepia h4,
body.theme-sepia strong {
  color: #2F2214 !important;
}

body.theme-sepia input,
body.theme-sepia textarea,
body.theme-sepia select {
  background-color: #FAF5E8 !important;
  border-color: #E4D5B7 !important;
  color: #2F2214 !important;
}

/* Theme 3: Dark Theme override */
body.theme-dark {
  background-color: #121214 !important;
  color: #E1E1E6 !important;
}

body.theme-dark .header,
body.theme-dark .footer,
body.theme-dark .trending-bar,
body.theme-dark .contact-form-wrapper,
body.theme-dark .article-toc-box,
body.theme-dark .quiz-routine-box,
body.theme-dark .quiz-supplies-box,
body.theme-dark .author-box,
body.theme-dark .checklist-item,
body.theme-dark .visualizer-product-card {
  background-color: #1A1A1E !important;
  border-color: #2E2E35 !important;
  color: #E1E1E6 !important;
}

body.theme-dark .article-supplies,
body.theme-dark .contact-container,
body.theme-dark .visualizer-panel,
body.theme-dark .checklist-summary-box,
body.theme-dark .reader-control-panel {
  background: linear-gradient(135deg, #1A1A1E 0%, #121214 100%) !important;
  border-color: #2E2E35 !important;
}

body.theme-dark p,
body.theme-dark span,
body.theme-dark li,
body.theme-dark a:not(.btn):not(.product-card__btn) {
  color: #A9A9B2 !important;
}

body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark strong {
  color: #FFF !important;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
  background-color: #1A1A1E !important;
  border-color: #2E2E35 !important;
  color: #FFF !important;
}

.theme-pill--active {
  border-color: var(--color-coral-red) !important;
  box-shadow: 0 0 0 2px var(--color-coral-red);
}







