/* Custom Fonts & Styling for Esbelta Tu Figura */

@font-face {
  font-family: 'Gentle Heart';
  src: url('../fonts/GentleHearts-Regular.ttf') format('truetype'),
       url('../fonts/GentleHearts-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  /* Exclude 0-9 (U+0030-U+0039) so numbers seamlessly render via Playfair Display without trial watermarks */
  unicode-range: U+0000-002F, U+003A-FFFF;
}

@font-face {
  font-family: 'Affectionately Yours';
  src: url('../fonts/Affectionately%20Yours%20-%20TTF.ttf') format('truetype'),
       url('../fonts/Affectionately%20Yours%20-%20OTF.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Global utility classes */
.font-heading {
  font-family: 'Gentle Heart', 'Playfair Display', serif;
}

.font-accent {
  font-family: 'Affectionately Yours', 'Alex Brush', cursive;
}

.font-body {
  font-family: 'Poppins', sans-serif;
}

/* Smooth transitions & custom scrollbar */
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  /* Use clip instead of hidden to prevent secondary scroll container creation */
  overflow-x: clip;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f8f8f8;
}
::-webkit-scrollbar-thumb {
  background: #ba9352;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #045b2f;
}

/* ============================================================
   Fade In & Fade Out Animations
   ============================================================ */

/* Scroll-triggered reveal animations */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-on-scroll.is-hidden {
  opacity: 0;
  transform: translateY(24px);
}

/* Stagger delay classes for grid items */
.delay-75 { transition-delay: 0.075s; }
.delay-150 { transition-delay: 0.15s; }
.delay-225 { transition-delay: 0.225s; }
.delay-300 { transition-delay: 0.3s; }
.delay-375 { transition-delay: 0.375s; }

/* Keyframe utility animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-out {
  animation: fadeOut 0.35s ease forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Smooth FAQ Accordion Fade In & Out */
.faq-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              padding 0.35s ease;
}

.faq-item.active .faq-content {
  max-height: 350px;
  opacity: 1;
  padding-top: 0.25rem !important;
  padding-bottom: 1.25rem !important;
}

/* Mobile Menu Fade In & Out */
#mobile-menu {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Order Tracking Update Fade In & Out Transition */
.track-transition {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.track-transition.is-updating {
  opacity: 0;
  transform: scale(0.985);
}

/* Floating Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #f8d7df;
  border-left: 4px solid #d82269;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 14px;
  color: #045b2f;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-notification.fade-out {
  animation: fadeOutDown 0.35s ease forwards;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .toast-notification {
    left: 16px;
    right: 16px;
    bottom: 20px;
    padding: 12px 16px;
    font-size: 13px;
    justify-content: center;
    text-align: center;
  }
}

