/* ========================================
   Single Spice Section Styles
   輪播區塊樣式
   顏色變量請參考 css/global.css
   ======================================== */

/* ========================================
   Section Container
   ======================================== */
.single-spice {
  position: relative;
  padding: 80px 0;
  background: #fff;
  z-index: 10;
}

/* ========================================
   Hero Background
   ======================================== */
.single-spice__hero {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 0;
}

.single-spice__hero img {
  width: 100%;
  height: auto;
  display: block;
}


/* ========================================
   Tab Navigation
   ======================================== */
.single-spice__tabs {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  display: inline-flex;
  justify-content: center;
  gap: 10px;
  z-index: 30;
}

.single-spice__tab {
  width: 180px;
  padding: 12px 0;
  background: #fff;
  border-radius: 10px 10px 0 0;
  font-size: 18px;
  border: none;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.single-spice__tab:hover {
  opacity: 1;
}

.single-spice__tab.active {
  opacity: 1;
  color: var(--secondary-color);
}

/* ========================================
   Main Container
   ======================================== */
.single-spice__container {
  position: relative;
  z-index: 5;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   Section Header
   ======================================== */
.single-spice__header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 5;
}

.single-spice__title {
  font-size: 60px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.single-spice__subtitle {
  font-size: 36px;
  font-weight: 500;
  color: var(--text-dark);
}

/* ========================================
   Carousel Container
   ======================================== */
.single-spice__carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  z-index: 5;
}

.single-spice-swiper {
  padding: 40px 0;
}

/* 讓所有 slide 高度一致 */
.single-spice-swiper .swiper-wrapper {
  align-items: stretch;
}

.single-spice-swiper .swiper-slide {
  height: auto;
}

.swiper-slide:nth-child(5n+1) .product-card__image {
  background-image: url('../../images/bgImage/bg-1.png');
}

.swiper-slide:nth-child(5n+2) .product-card__image {
  background-image: url('../../images/bgImage/bg-2.png');
}

.swiper-slide:nth-child(5n+3) .product-card__image {
  background-image: url('../../images/bgImage/bg-3.png');
}

.swiper-slide:nth-child(5n+4) .product-card__image {
  background-image: url('../../images/bgImage/bg-4.png');
}

.swiper-slide:nth-child(5n+5) .product-card__image {
  background-image: url('../../images/bgImage/bg-5.png');
}

/* ========================================
   Product Card
   ======================================== */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

/* Product Image */
.product-card__image {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px 30px 140px 140px;
  padding: 30px 30px 40px 30px;
}

.product-card__image img {
  max-width: 160%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  transition: var(--transition);
}

.product-card__info {
  text-align: center;
}

.product-card__name-zh {
  font-size: 14px;
  margin-bottom: 4px;
}

.product-card__name-en {
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* ========================================
   Swiper Navigation
   ======================================== */
.swiper-button-prev,
.swiper-button-next {
  width: 48px;
  height: 48px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
  top: calc(50% - 60px);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  background-color: #333;
  -webkit-mask-image: url('../../images/icons/swiper-arrow.svg');
  mask-image: url('../../images/icons/swiper-arrow.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: background-color 0.3s ease;
}

.swiper-button-next::after {
  transform: rotate(180deg);
}

/* 調整箭頭位置 - 內推 20px */
.swiper-button-prev {
  left: 20px;
}

.swiper-button-next {
  right: 20px;
}

/* ========================================
   Action Button
   ======================================== */
.single-spice__btn {
  width: 300px;
  background-color: #fff;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
}

.single-spice__btn:hover {
  background: var(--secondary-color);
  color: #fff;
}

/* ========================================
   Responsive Design - Tablet (1024px)
   ======================================== */
@media (max-width: 1024px) {
  .single-spice {
    padding: 60px 0;
  }

  .single-spice__title {
    font-size: 48px;
  }

  .single-spice__subtitle {
    font-size: 24px;
  }

  .single-spice__tab {
    width: 160px;
    font-size: 16px;
  }

  .product-card__image {
    height: 300px;
  }
}

/* ========================================
   Responsive Design - Mobile (768px)
   ======================================== */
@media (max-width: 768px) {
  .single-spice__container {
    padding: 0;
  }

  .single-spice {
    padding: 40px 0;
  }

  .single-spice__tabs {
    width: 100%;
    left: 0;
    transform: translate(0, -100%);
    gap: 6px;
    padding: 0 4px;
    flex-wrap: nowrap;
    overflow-x: scroll;
    overflow-y: hidden;
    justify-content: flex-start;
  }

  .single-spice__tab {
    min-width: 84px;
    width: max-content;
    flex-shrink: 0;
    padding: 8px 0;
    font-size: 14px;
    border-radius: 12px 12px 0 0;
    white-space: nowrap;
  }

  .single-spice__header {
    margin-bottom: 24px;
  }

  .single-spice__title {
    font-size: 36px;
  }

  .single-spice__subtitle {
    font-size: 20px;
  }

  .single-spice-swiper {
    padding: 30px 50px;
  }

  .product-card__image {
    padding: 20px 20px 30px 20px;
  }

  .swiper-button-prev,
  .swiper-button-next {
    display: none;
  }
}

/* ========================================
   Responsive Design - Small Mobile (480px)
   ======================================== */
@media (max-width: 480px) {
  .single-spice__title {
    font-size: 32px;
  }

  .single-spice__subtitle {
    font-size: 18px;
  }

  .single-spice-swiper {
    padding: 20px 40px;
  }

  .product-card__image {
    height: 280px;
    padding: 15px 15px 25px 15px;
  }
}