/* ==========================================================================
   Hairland.pro Stylesheet
   Typography, Resets, Custom Controls, Animations & Carousels
   ========================================================================== */

html {
  scroll-padding-top: 100px;
  font-size: 16px;
  -webkit-overflow-scrolling: touch;
}

/* Universal Manrope Typography Enforcement across all elements */
*,
*::before,
*::after,
html,
body,
input,
button,
select,
textarea,
optgroup,
code,
kbd,
samp,
pre {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}

body {
  color: rgba(31, 30, 31, 1);
  background-color: #FFFFFF;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Optimization: Content-visibility for 60/120fps smooth scrolling across long landing pages */
section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 650px;
}

#hero {
  content-visibility: visible;
}

/* Header GPU layer acceleration - prevents repaint on scroll */
#site-header {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Optimization: Enforce strict minimum 0.875rem (14px) for all text, tags and badges across the entire site */
.text-2xs,
.text-xs,
.text-sm,
.text-\[10px\],
.text-\[11px\],
.text-\[12px\],
.text-\[13px\] {
  font-size: 0.875rem !important;
  line-height: 1.35rem !important;
}

small,
caption,
figcaption,
sub,
sup {
  font-size: 0.875rem !important;
  line-height: 1.35rem !important;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

input[type=range]::-webkit-slider-thumb {
  pointer-events: all;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fe9840;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  -webkit-appearance: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover,
input[type=range]::-webkit-slider-thumb:active {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(254, 152, 64, 0.45);
}

input[type=range]::-moz-range-thumb {
  pointer-events: all;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fe9840;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Custom sales range thumb color for teal */
#sales-range::-webkit-slider-thumb {
  background: #159197;
}

#sales-range::-webkit-slider-thumb:hover,
#sales-range::-webkit-slider-thumb:active {
  box-shadow: 0 3px 10px rgba(21, 145, 151, 0.45);
}

#sales-range::-moz-range-thumb {
  background: #159197;
}

/* Reviews & Universal carousel hide scrollbar and smooth snap */
.reviews-carousel-track,
.carousel-track,
.mobile-carousel-track {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  scroll-padding-left: 1rem;
  scroll-padding-right: 1rem;
}

.reviews-carousel-track::-webkit-scrollbar,
.carousel-track::-webkit-scrollbar,
.mobile-carousel-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

/* Unified Carousel Nav Button Style (Used across all carousels, mobile & desktop) */
.carousel-nav-btn {
  width: 2.5rem; /* 40px */
  height: 2.5rem; /* 40px */
  border-radius: 0.75rem; /* rounded-xl */
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB; /* graphite-200 */
  color: #1f1e1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.carousel-nav-btn:hover:not(:disabled) {
  border-color: #fe9840;
  color: #fe9840;
  background-color: rgba(254, 152, 64, 0.08);
  transform: translateY(-1px);
}

.carousel-nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.carousel-nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* Unified Carousel Dot Indicator Style */
.carousel-dot {
  height: 0.625rem; /* 10px */
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  padding: 0;
  display: inline-block;
}

.carousel-dot.active {
  width: 2rem; /* 32px / w-8 */
  background-color: #fe9840 !important;
  box-shadow: 0 2px 6px rgba(254, 152, 64, 0.4);
}

.carousel-dot:not(.active) {
  width: 0.625rem; /* 10px */
  background-color: #D1D5DB; /* graphite-300 */
}

.carousel-dot:not(.active):hover {
  background-color: #9CA3AF; /* graphite-400 */
}

/* Mobile FAQ Tag Position: Tag (инструкция, безопасность, результаты) placed on top above question */
@media (max-width: 639px) {
  .faq-item summary {
    align-items: flex-start !important;
  }
  .faq-item summary > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }
  .faq-item summary > div:first-child > span:first-child {
    margin-bottom: 0.125rem !important;
    align-self: flex-start !important;
  }
}

/* Distinct FAQ Categories & Badges - Soft Pastel Palette with Delicate Borders */
.faq-tag-instructions {
  background-color: #fff8f1 !important;
  color: #c25e00 !important;
  border: 1px solid rgba(254, 152, 64, 0.35) !important;
}

.faq-tag-results {
  background-color: #eef8f8 !important;
  color: #0f766e !important;
  border: 1px solid rgba(21, 145, 151, 0.35) !important;
}

.faq-tag-safety {
  background-color: #f1f5f9 !important;
  color: #334e68 !important;
  border: 1px solid rgba(91, 130, 166, 0.35) !important;
}

/* Category open card accents */
.faq-item[data-category="instructions"][open] {
  border-color: #fe9840 !important;
  box-shadow: 0 4px 14px -2px rgba(254, 152, 64, 0.1) !important;
}

.faq-item[data-category="efficacy"][open] {
  border-color: #159197 !important;
  box-shadow: 0 4px 14px -2px rgba(21, 145, 151, 0.1) !important;
}

.faq-item[data-category="safety"][open] {
  border-color: #5b82a6 !important;
  box-shadow: 0 4px 14px -2px rgba(91, 130, 166, 0.1) !important;
}

/* Category summary hover styles */
.faq-item[data-category="instructions"] summary:hover {
  color: #c25e00 !important;
}
.faq-item[data-category="efficacy"] summary:hover {
  color: #0f766e !important;
}
.faq-item[data-category="safety"] summary:hover {
  color: #334e68 !important;
}

/* Category arrow open circle styles */
.faq-item[data-category="instructions"][open] summary > span:last-child {
  background-color: rgba(254, 152, 64, 0.15) !important;
  color: #c25e00 !important;
}

.faq-item[data-category="efficacy"][open] summary > span:last-child {
  background-color: rgba(21, 145, 151, 0.15) !important;
  color: #0f766e !important;
}

.faq-item[data-category="safety"][open] summary > span:last-child {
  background-color: rgba(91, 130, 166, 0.15) !important;
  color: #334e68 !important;
}

/* FAQ Badge Visuals: Inactive & Active tab contrast guarantee */
.faq-category-btn.is-active {
  background-color: #1F1E1F !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.faq-category-btn.is-active:hover {
  background-color: #2b2a2b !important;
  color: #ffffff !important;
}

/* Active Badge: Vibrant brand-orange pill with bold dark text #1F1E1F */
.faq-category-btn.is-active .faq-count-badge,
.faq-category-btn.is-active:hover .faq-count-badge,
.faq-count-badge.badge-active {
  background-color: #fe9840 !important;
  color: #1F1E1F !important;
  border: 1px solid rgba(254, 152, 64, 0.6) !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* При наведении на активную кнопку цифра остается четкой и темной на оранжевой плашке */
.faq-category-btn.is-active:hover .faq-count-badge,
.faq-category-btn.is-active:hover .badge-active {
  background-color: #ffa858 !important;
  color: #1F1E1F !important;
  border-color: #fe9840 !important;
}

.faq-category-btn:not(.is-active) .faq-badge-all,
.faq-category-btn:not(.is-active) [data-badge="all"],
.faq-count-badge.badge-inactive-all {
  background-color: #e2e8f0 !important;
  color: #1F1E1F !important; /* deep dark readable number 27 on light badge */
  border-color: #cbd5e1 !important;
}

/* Scroll to Top Button */
#scroll-to-top-btn.is-visible {
  opacity: 0.9 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

#scroll-to-top-btn.is-visible:hover {
  opacity: 1 !important;
}

/* Category inner callout boxes inside answers */
.faq-item[data-category="efficacy"] .bg-amber-50\/70 {
  background-color: rgba(224, 242, 241, 0.6) !important;
  border-color: rgba(21, 145, 151, 0.25) !important;
}

.faq-item[data-category="safety"] .bg-amber-50\/70 {
  background-color: rgba(241, 245, 249, 0.8) !important;
  border-color: rgba(91, 130, 166, 0.25) !important;
}

/* Universal Smooth Scroll Reveal (Hardware-accelerated, lightweight, zero jank) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: none; /* Removes transition overhead once element is in view */
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
  transition: none;
}

/* Stagger delay utilities */
.delay-100 { transition-delay: 60ms; }
.delay-200 { transition-delay: 120ms; }
.delay-300 { transition-delay: 180ms; }
.delay-400 { transition-delay: 240ms; }
.delay-500 { transition-delay: 300ms; }

/* Interactive Hover Elevation for Cards (GPU accelerated) */
.card-hover-effect {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover-effect:hover {
  transform: translateY(-3px);
}

/* Ingredients Showcase Badges - Dark, Tight & Animated exactly like Catalog Product Cards */
.ingredient-badge-pill {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  background-color: rgba(31, 30, 31, 0.92);
  border: 1px solid rgba(82, 82, 91, 0.7);
  color: #f8fafc;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.25), 0 1px 2px -1px rgba(0, 0, 0, 0.2);
  transform: scale(1);
  transform-origin: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow, border-color;
}

.ingredient-badge-pill:hover {
  transform: scale(1.025) !important;
  background-color: rgba(31, 30, 31, 1) !important;
  border-color: #fe9840 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(254, 152, 64, 0.2) !important;
  z-index: 30 !important;
}

#ingredients-main-img,
#ingredients-main-video {
  transform: none !important;
  filter: none !important;
}

.ingredient-spotlight-zone {
  position: absolute;
  left: 2%;
  right: 2%;
  border-radius: 0.75rem;
  pointer-events: none;
  display: none;
  z-index: 15;
}

.ingredient-spotlight-zone.is-active {
  display: block;
}

.ingredient-spotlight-teal {
  background-color: rgba(21, 145, 151, 0.08);
}

.ingredient-spotlight-amber {
  background-color: rgba(254, 152, 64, 0.09);
}

.ingredient-spotlight-purple {
  background-color: rgba(99, 102, 241, 0.08);
}

.ingredient-spotlight-green {
  background-color: rgba(16, 185, 129, 0.08);
}

.ingredient-card-highlight {
  border-color: #159197 !important;
}

/* ==========================================================================
   High-Performance Hardware-Accelerated Modals
   Eliminates backdrop-filter blur bottleneck and layout thrashing for 60/120fps
   ========================================================================== */
.modal-overlay {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.modal-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease-out !important;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0) scale(0.96);
  -webkit-transform: translate3d(0, 0, 0) scale(0.96);
  opacity: 0.85;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: paint;
}

.modal-overlay.opacity-100 .modal-card,
.modal-overlay:not(.opacity-0) .modal-card,
.modal-card.scale-100 {
  transform: translate3d(0, 0, 0) scale(1) !important;
  -webkit-transform: translate3d(0, 0, 0) scale(1) !important;
  opacity: 1 !important;
}

/* ==========================================================================
   Before / After Comparison Slider
   Ensures container always maintains 4:3 aspect ratio and proper clipping
   ========================================================================== */
#before-after-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 280px;
}

#before-image-clip {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  -webkit-clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

/* ==========================================================================
   B2B Interest Radio Indicator (White border on checked radio button)
   ========================================================================== */
.b2b-custom-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  border: 2px solid #cbd5e1;
  background-color: #ffffff;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

label:hover .b2b-custom-radio {
  border-color: #fe9840;
}

.b2b-custom-radio:checked {
  background-color: #fe9840 !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 0 0 2px #fe9840 !important;
}


