/* ==========================================
   CIMED - Fini Carmed Beijos Landing Page
   ========================================== */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cimed-yellow: #FFC107;
  --cimed-yellow-dark: #FFB300;
  --cimed-yellow-light: #FFD54F;
  --fini-pink: #E91E8C;
  --fini-pink-dark: #D81B60;
  --fini-pink-light: #F48FB1;
  --black: #000000;
  --white: #FFFFFF;
  --gray: #333333;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cimed-yellow);
  color: var(--black);
  overflow-x: hidden;
}

/* ==========================================
   PRELOADER
   ========================================== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--cimed-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: background 0.8s ease, opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.revealing {
  background: transparent;
}

.preloader.revealing .preloader-content {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  z-index: 1;
}

.preloader-logo {
  width: 280px;
  height: auto;
  animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.02); }
}

.preloader-bar {
  width: 200px;
  height: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-progress {
  width: 0%;
  height: 100%;
  background: var(--black);
  border-radius: 2px;
  animation: loadProgress 2.5s ease forwards;
}

@keyframes loadProgress {
  0% { width: 0%; }
  20% { width: 20%; }
  50% { width: 60%; }
  80% { width: 90%; }
  100% { width: 100%; }
}

/* Rain Container - candies falling from top */
.rain-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.rain-candy {
  position: absolute;
  width: 400px;
  height: auto;
  top: -450px;
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.rain-candy.falling {
  opacity: 1;
  animation: candyFall 1.5s ease-in forwards;
}

@keyframes candyFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(calc(100vh + 450px)) rotate(360deg) scale(1);
    opacity: 1;
  }
}

/* Explosion Container */
.explosion-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  pointer-events: none;
}

.explosion-candy {
  position: absolute;
  width: 180px;
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: none;
}

.explosion-candy.ready {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.explosion-candy.explode {
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s ease-out;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.main-content.visible {
  opacity: 1;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 80px 60px 120px;
  gap: 20px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 40%, rgba(233, 30, 140, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(233, 30, 140, 0.1) 0%, transparent 40%),
    var(--cimed-yellow);
  z-index: 0;
}

/* ==========================================
   FLOATING CANDIES PARALLAX
   ========================================== */
.floating-candies {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.candy {
  position: absolute;
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* Background layer - far, blurred, small */
.candy-bg {
  filter: blur(4px);
  opacity: 0.5;
  z-index: 1;
}

/* Middle layer - sharp, focused */
.candy-mid {
  filter: none;
  opacity: 0.9;
  z-index: 5;
}

/* Foreground layer - close, blurred, large */
.candy-fg {
  filter: blur(6px);
  opacity: 0.6;
  z-index: 10;
}

/* Extra large layer - very close, heavy blur */
.candy-xl {
  filter: blur(10px);
  opacity: 0.4;
  z-index: 15;
}

/* Product Container */
.product-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.product-wrapper {
  position: relative;
}

.product-image {
  width: 500px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.product-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 250px;
  background: radial-gradient(ellipse, rgba(233, 30, 140, 0.4) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  filter: blur(60px);
  z-index: -1;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: left;
  max-width: 500px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fini-pink);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes badgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.badge-icon {
  font-size: 18px;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}

.title-fini {
  display: block;
  color: var(--fini-pink);
  text-shadow: 2px 2px 0 var(--white);
}

.title-carmed {
  display: block;
  color: var(--black);
}

.title-beijos {
  display: block;
  color: var(--fini-pink-dark);
  font-style: italic;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--gray);
  max-width: 500px;
  margin: 0 auto 30px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  background: var(--fini-pink);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(233, 30, 140, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(233, 30, 140, 0.5);
  background: var(--fini-pink-dark);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  background: transparent;
  color: var(--black);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  border: 2px solid var(--black);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--black);
  color: var(--cimed-yellow);
  transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--gray);
  font-size: 14px;
  z-index: 10;
  opacity: 0.7;
}

.scroll-arrow {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ==========================================
   PRODUCTS SHOWCASE SECTION
   ========================================== */
.products-showcase {
  position: relative;
  width: 100%;
  padding: 60px 20px 0;
  background: linear-gradient(180deg, #E8254E 0%, #C41E3A 50%, #B01830 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.products-title {
  position: relative;
  z-index: 2;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: white;
  text-align: center;
  margin-bottom: 40px;
}

.products-title em {
  font-style: italic;
  font-weight: 700;
}

.products-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  width: 100%;
  max-width: 1200px;
  padding: 0 10px;
}

.product-item-wrapper {
  position: relative;
  overflow: visible;
}

.product-item {
  width: 110px;
  height: auto;
  transform: translateY(25%);
  transition: transform 0.4s ease;
}

.product-item-wrapper:hover .product-item {
  transform: translateY(0);
}

/* ==========================================
   PRODUCTS ACCORDION SECTIONS
   ========================================== */
.products-accordion {
  width: 100%;
}

.product-accordion {
  width: 100%;
  scroll-margin-top: 20px;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.accordion-header:hover {
  filter: brightness(1.1);
}

.accordion-header h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: white;
  margin: 0;
}

.accordion-icon {
  font-size: 2rem;
  font-weight: 300;
  color: white;
  transition: transform 0.3s ease;
}

.product-accordion.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.product-accordion.active .accordion-content {
  max-height: 600px;
}

.accordion-content .product-detail-content {
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.product-detail-info {
  flex: 1;
  color: white;
}

.product-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-description {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.6;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-features li {
  font-size: 1.1rem;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-features li:last-child {
  border-bottom: none;
}

.product-detail-img {
  width: 220px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
  transition: transform 0.4s ease;
}

.product-accordion.active .product-detail-img {
  animation: productReveal 0.5s ease forwards;
}

@keyframes productReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .accordion-header {
    padding: 20px;
  }
  
  .accordion-content .product-detail-content {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }
  
  .product-detail-img {
    width: 180px;
  }
  
  .product-features li {
    justify-content: center;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  color: var(--black);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--cimed-yellow-light);
  padding: 40px 30px;
  border-radius: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--black);
}

.feature-card p {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ==========================================
   CTA SECTION
   ========================================== */
.cta-section {
  background: linear-gradient(135deg, var(--fini-pink) 0%, var(--fini-pink-dark) 100%);
  padding: 100px 20px;
}

.cta-content {
  text-align: center;
  color: var(--white);
}

.cta-content h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 50px;
  background: var(--cimed-yellow);
  color: var(--black);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Map styles removed */

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: #F5C518;
  padding: 60px 20px;
  text-align: center;
}

.footer-logo {
  width: 200px;
  height: auto;
  margin-bottom: 20px;
}

.footer p {
  color: rgba(0, 0, 0, 0.7);
  font-size: 14px;
}

/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding: 100px 40px 100px;
    gap: 40px;
  }
  
  .hero-content {
    text-align: center;
    max-width: 100%;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .product-image {
    width: 450px;
  }
  
  /* Accordion content stacks on tablet */
  .accordion-content .product-detail-content {
    flex-direction: column;
    gap: 30px;
    padding: 30px;
  }
  
  .product-detail-img {
    width: 250px;
  }
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */
@media (max-width: 768px) {
  /* === RAIN CANDY OPTIMIZATION FOR MOBILE === */
  .rain-candy {
    width: 120px;
    top: -150px;
  }
  
  /* Hide most candies to reduce animation load on mobile */
  .rain-candy:nth-child(2n),
  .rain-candy:nth-child(3n) {
    display: none;
  }
  
  @keyframes candyFall {
    0% {
      transform: translateY(0) rotate(0deg) scale(1);
      opacity: 0;
    }
    10% {
      opacity: 1;
    }
    100% {
      transform: translateY(calc(100vh + 150px)) rotate(180deg) scale(1);
      opacity: 1;
    }
  }
  
  /* === HERO SECTION === */
  .hero {
    padding: 80px 20px 60px;
    min-height: auto;
  }
  
  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    padding: 0 10px;
  }
  
  .product-image {
    width: 280px;
  }
  
  .preloader-logo {
    width: 180px;
  }
  
  .product-glow {
    width: 200px;
    height: 130px;
  }
  
  /* Floating candies less prominent on mobile */
  .floating-candy {
    opacity: 0.4;
    width: 40px;
  }
  
  .floating-candy:nth-child(1),
  .floating-candy:nth-child(2),
  .floating-candy:nth-child(3) {
    display: none;
  }
  
  /* === PRODUCTS SHOWCASE === */
  .products-showcase {
    padding: 40px 0 0;
  }
  
  .products-title {
    font-size: 1.5rem;
    padding: 0 20px;
    margin-bottom: 30px;
  }
  
  .products-row {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 20px 20px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  
  .product-item-wrapper {
    flex-shrink: 0;
    scroll-snap-align: center;
  }
  
  .product-item {
    width: 80px;
    transform: translateY(20%);
  }
  
  /* === ACCORDION SECTIONS === */
  .accordion-header {
    padding: 18px 20px;
  }
  
  .accordion-header h3 {
    font-size: 1.1rem;
  }
  
  .accordion-icon {
    font-size: 1.5rem;
  }
  
  .product-accordion.active .accordion-content {
    max-height: 800px; /* More space for mobile stacked layout */
  }
  
  .accordion-content .product-detail-content {
    flex-direction: column;
    padding: 25px 20px;
    gap: 25px;
    text-align: center;
  }
  
  .product-detail-info {
    order: 1;
  }
  
  .product-detail-img {
    order: 2;
    width: 180px;
    margin: 0 auto;
  }
  
  .product-badge {
    font-size: 0.8rem;
    padding: 6px 14px;
  }
  
  .product-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .product-features li {
    font-size: 0.95rem;
    padding: 10px 0;
    justify-content: center;
  }
  
  /* === FEATURES SECTION === */
  .features-section {
    padding: 60px 20px;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .feature-card {
    padding: 30px 20px;
  }
  
  .feature-icon {
    font-size: 40px;
  }
  
  .feature-card h3 {
    font-size: 1.2rem;
  }
  
  /* === CTA SECTION === */
  .cta-section {
    padding: 60px 20px;
  }
  
  .cta-content h2 {
    font-size: 1.6rem;
  }
  
  .cta-content p {
    font-size: 1rem;
  }
  
  .btn-cta {
    padding: 16px 35px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
  }
  
  /* === FOOTER === */
  .footer {
    padding: 40px 20px;
  }
  
  .footer-logo {
    width: 150px;
  }
  
  .footer p {
    font-size: 12px;
  }
  
  /* === HERO CTA BUTTONS === */
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
    padding: 14px 30px;
    font-size: 14px;
  }
  
  .scroll-indicator {
    display: none;
  }
}

/* ==========================================
   RESPONSIVE - SMALL MOBILE
   ========================================== */
@media (max-width: 480px) {
  .hero {
    padding: 60px 15px 40px;
  }
  
  .hero-content h1 {
    font-size: 1.6rem;
  }
  
  .product-image {
    width: 220px;
  }
  
  .products-title {
    font-size: 1.3rem;
  }
  
  .product-item {
    width: 65px;
  }
  
  .accordion-header {
    padding: 15px;
  }
  
  .accordion-header h3 {
    font-size: 1rem;
  }
  
  .accordion-content .product-detail-content {
    padding: 20px 15px;
  }
  
  .product-detail-img {
    width: 150px;
  }
  
  .cta-content h2 {
    font-size: 1.4rem;
  }
  
  .btn-cta {
    padding: 14px 25px;
    font-size: 14px;
  }
}

