 * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.carousel-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
  color: white;
}

/* 內容容器 - 響應式寬度 */
.carousel-content-wrapper {
  position: relative;
  max-width: 1294px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 50px;
  z-index: 10;
  box-sizing: border-box;
}

/* 內部內容區域 */
.carousel-inner-content {
  position: relative;
  height: 100%;
  width: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.carousel-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.carousel-slide.prev {
  transform: translateX(-100%);
}

/* 左側內容區域 - 桌機版 (768px 以上) */
.slide-content {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  max-width: 600px;
  z-index: 2;
  display: none; /* 預設隱藏所有內容 */
}

/* 只顯示當前活動的 slide-content */
.slide-content.active {
  display: block;
}

/* 手機版 (768px 以下) */
@media (max-width: 768px) {
  .slide-content {
    top: 48px;
    transform: none;
    left: 40px;
    right: 40px;
  }
}

/* 響應式調整 */
@media (max-width: 768px) {
  .carousel-content-wrapper {
    padding: 0 20px;
  }
  
  .slide-content {
    top: 48px;
    left: 0;
    right: 0;
    transform: none;
  }
}

@media (max-width: 1024px) {
  .carousel-slide {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
  
  .carousel-content-wrapper {
    padding: 0 30px;
  }
  
  .slide-content {
    top: 48px;
    transform: none;
    left: 0;
    right: 0;
    max-width: none;
  }
  
  .slide-title {
    font-size: 46px !important;
  }
  
  /* 手機版背景圖覆蓋 */
  @media (max-width: 768px) {
    .carousel-slide[data-mobile-bg] {
      background-image: var(--mobile-bg) !important;
      background-size: cover !important;
      background-position: center center !important;
      background-repeat: no-repeat !important;
      background-attachment: fixed !important;
    }
    
    .carousel-slide {
      background-size: cover !important;
      background-position: center center !important;
      background-repeat: no-repeat !important;
      background-attachment: fixed !important;
    }
  }
}

.product-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
  border-radius: 2px;
}

/* Slide Title - Desktop */
.slide-title {
  color: #FFF !important;
  font-family: "IBM Plex Sans", "Microsoft JhengHei", "微軟正黑體", sans-serif !important;
  font-size: 72px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: normal !important;
  margin-bottom: 25px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Slide Description */
.slide-description {
  color: #FFF;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin-bottom: 40px;
  max-width: 500px;
}

/* Discover Button */
.discover-btn {
  display: inline-flex;
  padding: 10px 20px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 20px;
  border: 1px solid #FFF;
  background: transparent;
  color: #FFF;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
  white-space: nowrap;
  width: auto;
  max-width: 100%;
}

.discover-btn:hover {
  background: white;
  color: #000;
  transform: translateY(-2px);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .slide-title {
    font-size: 46px;
  }
}

/* 底部產品分類 */
.product-categories {
  position: absolute;
  bottom: 80px;
  left: 0;
  max-width: calc(100% - 180px);
  overflow: hidden;
  z-index: 3;
}

.categories-wrapper {
  display: flex;
  gap: 40px;
  transition: transform 0.3s ease;
  transform: translateX(var(--scroll-offset, 0px));
}

.category-item {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding-top: 8px;
  padding-bottom: 0;
  min-width: 120px;
  width: 120px;
  flex-shrink: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-item:hover,
.category-item.active {
  color: white;
}

.category-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.category-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: white;
  transition: width 0.1s linear;
  z-index: 1;
}

.category-item.active::before {
  width: var(--progress, 0%);
}

/* 右側導航箭頭 */
.carousel-navigation {
  position: absolute;
  right: 0;
  bottom: 80px;
  display: flex;
  gap: 14px;
  z-index: 10;
}

.nav-arrow {
  width: 55px;
  height: 55px;
  background: transparent !important;
  border: none !important;
  padding: 0;
  margin: 0;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  overflow: hidden;
}

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

.nav-arrow .arrow-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-arrow:hover .arrow-normal {
  opacity: 0;
}

.nav-arrow:hover .arrow-hover {
  opacity: 1;
}

.nav-arrow:active {
  transform: scale(0.95);
  background: transparent !important;
}

.nav-arrow:active .arrow-normal {
  opacity: 0;
}

.nav-arrow:active .arrow-hover {
  opacity: 1;
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-arrow:disabled .arrow-hover {
  display: none;
}

.nav-arrow:disabled .arrow-normal {
  display: block;
  opacity: 1;
}

/* 進度指示器 */
.progress-indicator {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  z-index: 10;
  display: none;
}

/* 空資料處理 */
.rs-carousel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  background: #f5f5f5;
  border: 2px dashed #ddd;
  border-radius: 8px;
}

.rs-carousel-empty p {
  color: #666;
  font-size: 18px;
  margin: 0;
}

/* 響應式設計 */
@media (max-width: 1024px) and (min-width: 769px) {
  .slide-content {
    left: 40px;
    max-width: 500px;
  }

  .slide-title {
    font-size: 3rem;
  }

  .product-categories {
    left: 40px;
    bottom: 32;
    max-width: calc(100vw - 40px - 150px - 20px);
  }

  .categories-wrapper {
    gap: 8px
  }

  .category-item {
    min-width: 100px;
    width: 100px;
    font-size: 11px;
  }

  .carousel-navigation {
    right: 40px;
    bottom: 60px;
  }

  .progress-indicator {
    right: 40px;
    bottom: 60px;
  }
}

@media (max-width: 768px) {
  .slide-content {
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .slide-title {
    font-size: 2.2rem;
  }

  .product-categories {
    left: 20px;
    flex-wrap: nowrap;
    bottom: 32px;
    max-width: calc(100vw - 20px - 80px - 20px);
  }
  
  .categories-wrapper {
    gap: 16px !important;
  }

  .category-item {
    min-width: 100px;
    width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .carousel-navigation {
    display: none;
  }

  .progress-indicator {
    bottom: 32px;
    display: block;
  }
}

/* 載入動畫 */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-content > * {
  animation: slideInLeft 0.8s ease-out;
}

.slide-content .product-tag {
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

.slide-content .slide-title {
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

.slide-content .slide-description {
  animation-delay: 0.3s;
  animation-fill-mode: both;
}

.slide-content .discover-btn {
  animation-delay: 0.4s;
  animation-fill-mode: both;
}
