/* ===============================================
   WORLDFEAST SHOP INDEX - Page Specific Styles
   Apple-inspired Premium Arab Food Shopping Mall
=============================================== */

/* Import Variables */
@import url('../variables.css');

/* ===============================================
   HERO BANNER SLIDER
=============================================== */
.hero-banner-slider {
  width: 100%;
  margin: 0;
  position: relative;
  background: var(--color-bg-secondary);
}

.banner-slider-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0;
  position: relative;
}

.banner-slides-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: transparent;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
  z-index: 1;
}

.banner-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Navigation Arrows */
.banner-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-lg);
  opacity: 0;
}

.banner-slider-container:hover .banner-nav-arrow {
  opacity: 1;
}

.banner-nav-arrow:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-xl);
}

.banner-nav-arrow i {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  transition: var(--transition-base);
}

.banner-nav-arrow:hover i {
  color: var(--color-white);
}

.banner-nav-arrow.prev {
  left: var(--space-lg);
}

.banner-nav-arrow.next {
  right: var(--space-lg);
}

.banner-nav-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* Slide Indicators */
.banner-indicators {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-sm);
  z-index: 10;
}

.indicator {
  width: 32px;
  height: 4px;
  background: rgba(126, 211, 33, 0.4);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.indicator:hover {
  background: rgba(126, 211, 33, 0.7);
  transform: scaleY(1.5);
}

.indicator.active {
  background: var(--color-primary);
  width: 48px;
  box-shadow: 0 2px 8px rgba(126, 211, 33, 0.8);
}

/* ===============================================
   PRODUCT SECTIONS
=============================================== */
.product-section {
  padding: var(--space-2xl) 0;
  position: relative;
  background: var(--color-bg-secondary);
}

.product-section:last-of-type {
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  animation: fadeInDown 0.6s ease;
}

.section-header h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.section-header-p {
  text-align: center;
  margin-bottom: var(--space-3xl);
  animation: fadeInUp 0.6s ease 0.2s both;
}

.section-header-p p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin: 0 auto;
}

/* ===============================================
   NEW ARRIVALS SLIDER - AUTO LINEAR ANIMATION
=============================================== */
.new-arrivals-slider-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: var(--space-lg) 0;
}

.new-arrivals-slider {
  display: flex;
  gap: var(--space-xl);
  width: max-content;
  animation: slideLinear 40s linear infinite;
  will-change: transform;
}

.new-arrivals-slider.paused {
  animation-play-state: paused !important;
}

.new-arrivals-slider .product-card {
  flex: 0 0 220px;
}

@keyframes slideLinear {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ===============================================
   BRANDS SECTION (Hidden - moved to footer)
=============================================== */
.brands-section {
  display: none; /* Brands now shown in footer */
}

/* ===============================================
   ANIMATIONS
=============================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Intersection Observer Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===============================================
   RESPONSIVE DESIGN
=============================================== */
@media (max-width: 1024px) {
  .banner-slides-wrapper {
    height: 500px;
  }

  .brands-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .hero-banner-slider {
    margin: var(--space-lg) 0;
  }

  .banner-slides-wrapper {
    height: 420px;
  }

  .banner-nav-arrow {
    width: 44px;
    height: 44px;
    opacity: 1;
  }

  .banner-nav-arrow.prev {
    left: var(--space-md);
  }

  .banner-nav-arrow.next {
    right: var(--space-md);
  }

  .banner-indicators {
    bottom: var(--space-md);
  }

  .section-header h2 {
    font-size: var(--text-3xl);
  }

  .new-arrivals-slider-wrapper {
    padding: 0;
  }

  .new-arrivals-slider .product-card {
    flex: 0 0 200px;
  }

  .brands-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
  }

  .brand-item {
    min-height: 100px;
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .banner-slides-wrapper {
    height: 300px;
  }

  .banner-nav-arrow {
    width: 36px;
    height: 36px;
  }

  .banner-nav-arrow i {
    font-size: var(--text-base);
  }

  .indicator {
    width: 24px;
    height: 3px;
  }

  .indicator.active {
    width: 36px;
  }

  .section-header h2 {
    font-size: var(--text-2xl);
  }

  .section-header-p p {
    font-size: var(--text-base);
  }

  .product-section {
    padding: var(--space-3xl) 0;
  }

  .new-arrivals-slider .product-card {
    flex: 0 0 160px;
  }

  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .brand-item {
    min-height: 80px;
  }

  .brand-item img {
    max-height: 60px;
  }
}

/* Touch Device Support */
@media (hover: none) {
  .banner-nav-arrow {
    opacity: 1;
  }

  .banner-slides-wrapper {
    touch-action: pan-x;
  }

  .new-arrivals-slider {
    -webkit-overflow-scrolling: touch;
  }
}

/* ===============================================
   EMPTY SECTION STYLES
=============================================== */
.empty-section {
  text-align: center;
  padding: 40px 20px;
}

.empty-section i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 16px;
  display: block;
}

.empty-section h3 {
  color: #666;
  margin-bottom: 8px;
}

.empty-section p {
  color: #999;
  margin: 0;
}

/* ===============================================
   BUSINESS ACCOUNT STYLES
=============================================== */
.product-section .price-info:has(.quote-price) {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.product-section .quote-price {
  color: #007AFF;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
}

.product-section .business-actions {
  justify-content: center;
}

.product-section .add-to-cart.full-width {
  width: 100%;
  flex: 1;
}

/* ===============================================
   SOLD OUT BADGE
=============================================== */
.product-section .sold-out-badge {
  width: 100%;
  padding: 10px 16px;
  background-color: #9e9e9e;
  color: #ffffff;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

/* 품절 상품 카드 시각적 구분 */
.product-section .product-card:has(.sold-out-badge) .product-image img {
  opacity: 0.6;
  filter: grayscale(30%);
}

.product-section .product-card:has(.sold-out-badge) .product-info h3 {
  color: var(--color-text-tertiary);
}