/* Carousel Components Styles */

/* =========================================
   Hero Carousel
   ========================================= */
.hero-carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-background);
  border-radius: 0;
  margin-bottom: var(--spacing-3xl);
  height: 550px;
  /* Increased height for more content */
  box-shadow: var(--shadow-md);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform var(--transition-normal) var(--transition-timing);
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* Dot Pattern Overlay */
.hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 1;
}

.hero-slide-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-top: var(--spacing-2xl);
  padding-bottom: var(--spacing-2xl);
  padding-left: 80px;
  padding-right: 80px;
  position: relative;
  z-index: 2;
}

/* Slide Content */
.hero-content {
  flex: 1;
  max-width: 55%;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-slide.active .hero-content {
  opacity: 1;
  transform: translateY(0);
}

/* Top Badges Row */
.hero-top-badges {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.hero-badge-flash {
  background: #fbbf24;
  /* Amber 400 */
  color: #92400e;
  /* Amber 800 */
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hero-badge-timer {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Brand */
.hero-brand {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

/* Title */
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-primary-contrast);
  margin-bottom: 10px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Description */
.hero-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 25px;
  max-width: 90%;
  line-height: 1.5;
  font-weight: 400;
}

/* Price Box */
.hero-price-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 15px 25px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.hero-price-info {
  display: flex;
  flex-direction: column;
}

.hero-price-old {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.hero-price-current {
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.hero-installments {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
  font-weight: 500;
}

.hero-economy-badge {
  background: #ef4444;
  /* Red 500 */
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hero-economy-value {
  font-size: 13px;
}

/* Actions */
.hero-actions {
  display: flex;
  gap: 15px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
}

.hero-btn-primary {
  background: #ffffff;
  color: #2563eb;
  /* Blue 600 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: #f8fafc;
}

.hero-btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* Slide Image */
.hero-image-container {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
}

.hero-image {
  max-height: 90%;
  max-width: 110%;
  /* Allow slight overlap */
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
  opacity: 0;
  transform: scale(0.9) translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.hero-slide.active .hero-image {
  opacity: 1;
  transform: scale(1) translateX(0);
}

/* Background Shapes - Refined */
.hero-bg-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 1;
  filter: blur(20px);
}

/* Navigation Controls */
.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-primary-contrast);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
  font-size: 16px;
}

.hero-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.hero-prev {
  left: var(--spacing-xl);
}

.hero-next {
  right: var(--spacing-xl);
}

.hero-dots {
  position: absolute;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
}

.hero-dot.active {
  background: #ffffff;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Product Carousel (Upgrade) - Keeping existing styles */
.product-carousel-wrapper {
  position: relative;
  padding: 0 var(--spacing-xl);
}

.product-carousel-track {
  display: flex;
  gap: var(--spacing-lg);
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: var(--spacing-md) 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-carousel-track::-webkit-scrollbar {
  display: none;
}

.product-carousel-item {
  flex: 0 0 auto;
  width: 280px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }

  .hero-slide {
    padding: 0;
  }

  .hero-content {
    max-width: 50%;
  }

  .hero-price-current {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .hero-carousel-container {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    margin-bottom: var(--spacing-lg);
    border-radius: 12px;
    overflow: hidden !important;
  }

  .hero-slide {
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
  }

  .hero-slide-content-wrapper {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    padding: 5px 35px;
    height: 100% !important;
    align-items: flex-start;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  .hero-content {
    max-width: 58%;
    width: 58%;
    margin-top: 0;
    align-items: flex-start;
    text-align: left;
    flex: 0 0 58%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 0;
    padding-right: 5px;
    z-index: 5;
    height: 100%;
    padding-top: 2px;
  }

  .hero-top-badges {
    justify-content: flex-start;
    margin-bottom: 2px;
    transform: scale(0.75);
    transform-origin: left top;
    width: 135%; /* Compensate scale */
  }

  /* Reduce brand/rating size on mobile */
  .hero-meta-row {
    margin-bottom: 2px !important;
    gap: 6px !important;
  }

  .hero-brand {
    font-size: 11px !important;
  }

  .hero-rating {
    font-size: 11px !important;
  }

  .hero-image-container {
    height: 100% !important; /* Increased from 90% */
    width: 40% !important;
    margin-bottom: 0;
    flex: 0 0 40%;
    min-height: auto;
    display: flex;
    align-items: flex-start; /* Align to top */
    justify-content: center;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    overflow: hidden !important;
    align-self: flex-start; /* Align container to top */
    padding-top: 10px; /* Slight top padding */
  }

  .hero-image {
    max-height: 110% !important; /* Allow image to be taller */
    width: auto;
    max-width: 130% !important; /* Allow image to be wider */
    object-fit: contain;
    transform: scale(1.15) translateY(-5%); /* Scale up and move up slightly */
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.15));
    transform-origin: top center;
  }

  .hero-title {
    font-size: 1.1rem;
    margin-bottom: 4px;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-description {
    display: none;
  }

  .hero-actions {
    flex-direction: row;
    gap: 8px;
    width: 100%;
    justify-content: flex-start;
    margin-top: 55px; /* Significantly increased to push buttons to the bottom half */
  }

  .hero-btn {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1;
    height: 36px;
    white-space: nowrap;
    max-width: 150px; /* Increased max-width */
    border-radius: 8px;
  }

  .hero-price-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 12px; /* Increased padding to make card bigger */
    width: auto;
    margin-bottom: 4px;
    transform: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
  }

  .hero-price-current {
    font-size: 22px; /* Increased from 18px */
    font-weight: 700;
  }

  .hero-price-old {
    font-size: 10px;
    margin-bottom: 0;
  }

  .hero-installments {
    font-size: 9px;
    margin-top: 0;
  }

  .hero-economy-badge {
    display: none; /* Hide to save space */
  }

  .hero-nav-btn {
    width: 28px;
    height: 28px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    z-index: 20;
    backdrop-filter: blur(4px);
  }

  .hero-prev {
    left: 2px;
  }

  .hero-next {
    right: 2px;
  }

  .hero-dots {
    bottom: 5px;
    transform: translateX(-50%) scale(0.8);
  }

  .product-carousel-item {
    width: 160px;
  }
}