/**
 * 商品展示輪播樣式
 * @package mytheme
 */

.product-orange-title {
  font-size: 1.5rem;
  color: #ff942b;
  font-weight: 500;
  margin-bottom: 32px;
}

.section-product-showcase {
  padding-bottom: 36px;
  width: 100%;
}

.section-product-showcase .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 輪播包裝器 */
.product-carousel-wrapper {
  width: 100%;
  max-width: 1210px;
  padding: 16px;
  margin-bottom: 3rem;
}

.product-carousel-wrapper:last-child {
  margin-bottom: 0;
}

/* 輪播標題 */
.product-carousel__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0b2341;
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
  border-left: 4px solid #ffab36;
}

/* 輪播滑塊容器 */
.product-carousel__slider {
  display: flex;
  flex-wrap: nowrap;
  gap: 64px;
  overflow: hidden;
}

/* 商品卡片 */
.product-card {
  flex-shrink: 0;
  width: calc((100% - 128px) / 3);
  transition: opacity 0.3s ease;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  padding-bottom: 32px;
  max-width: 360px;
}

.product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.product-card__link:hover {
  text-decoration: none;
}

/* 商品圖片 */
.product-card__image {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #f5f5f5;
}

.product-card__image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.product-card__image img:hover {
  filter: brightness(1.05);
}

/* 商品內容 */
.product-card__content {
  padding: 1.5rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 商品名稱 */
.product-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #000;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 商品價格 */
.product-card__price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-card__sale-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: #000;
}

.product-card__regular-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0b2341;
}

.product-card__regular-price--strikethrough {
  font-size: 1rem;
  color: #000;
  text-decoration: line-through;
}

.product-card__meta {
  color: #000;
  font-size: 12px;
}

/* 查看商品按鈕 */
.product-card__button {
  display: block;
  text-align: center;
  background: linear-gradient(90deg, #ff942b 0%, #ffdc37 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.3s ease;
  align-content: center;
  text-align: center;
  width: 172px;
  height: 36px;
}

.product-card__button:hover {
  filter: brightness(0.9);
}

/* 無商品提示 */
.product-carousel__empty {
  text-align: center;
  color: #666;
  font-size: 1rem;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 0.5rem;
}

/* 商品輪播分頁點樣式覆寫 */
.product-carousel-wrapper .slider-dots {
  margin-top: 28px;
}

.product-carousel-wrapper .slider-dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: linear-gradient(90deg, #ff942b 0%, #ffdc37 100%);
  border: none;
}

/* 未點擊時：漸層外框 + 白色中空 */
.product-carousel-wrapper .slider-dot::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  background: #fff;
  border-radius: 50%;
  transition: opacity 0.3s ease;
}

/* 點擊時：填滿漸層 */
.product-carousel-wrapper .slider-dot.active::before {
  opacity: 0;
}

/* 商品圖片改為連結 */
a.product-card__image {
  display: block;
  position: relative;
}

/* ========================================
   商品展示輪播 - 響應式樣式
   ======================================== */

@media (max-width: 1024px) {
  .product-carousel__slider {
    gap: 1rem;
  }

  .product-carousel__slider .product-card {
    width: calc((100% - 2rem) / 3);
  }

  .product-carousel__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .product-card {
    max-width: 200px;
    height: 265px;
    padding-bottom: 19px;
  }

  .section-product-showcase {
    padding-bottom: 20px;
  }

  .product-carousel-wrapper {
    margin-bottom: 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
  }

  .product-card__image img {
    height: auto;
  }

  /* 手機版 Peek Carousel 樣式 */
  .product-carousel__slider {
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease;
  }

  .product-carousel__slider .product-card {
    display: block !important;
    flex: 0 0 200px;
    width: 200px;
    max-width: 200px;
  }

  .product-carousel__title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    padding-left: 0.375rem;
    border-left-width: 3px;
  }

  .product-card__content {
    padding: 17px 0 8px;
  }

  .product-card__name {
    font-size: 12px !important;
  }

  .product-card__sale-price {
    font-size: 11px !important;
  }

  .product-card__regular-price {
    font-size: 1.125rem;
  }

  .product-card__regular-price--strikethrough {
    font-size: 8px;
  }

  .product-card__meta {
    font-size: 6px;
  }

  .product-card__button {
    width: 96px;
    height: 20px;
    font-size: 11px;
  }

  .product-carousel-wrapper .slider-dots {
    margin-top: 1.25rem;
    width: 100%;
  }

  .product-carousel-wrapper .slider-dot {
    width: 4px;
    height: 4px;
  }

  .product-carousel-wrapper .slider-dot::before {
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
  }
}
