/* 确保自定义元素是 block 显示，间距设置才能生效 */
theme-product-showcase {
  display: block;
}

/* 全局 box-sizing - 修复 padding+percentage 导致的溢出问题 */
.product-showcase,
.product-showcase *,
.product-showcase *::before,
.product-showcase *::after {
  box-sizing: border-box;
}

/* =============================================================================
   基础容器样式
   ============================================================================= */
.product-showcase-container {
  background-color: rgb(var(--color-background));
}

.product-showcase-container .product-showcase-view {
    max-width: 1200px;
     margin: 0 auto;
    padding: 20px 0;
    position: relative;
}

/* =============================================================================
   标题区域
   ============================================================================= */
.product-showcase-container .header {
  margin: 0 auto;
  padding: 0px 20px;
  text-align: center;
}

.product-showcase-container .header .title {
  letter-spacing: 2px;
  font-size: 12px;
}

.product-showcase-container .header .subTitle {
  padding-top: 10px;
padding-bottom: 20px;
  font-size: 28px;
  letter-spacing: 5px;
}

/* =============================================================================
   桌面端幻灯片样式
   ============================================================================= */
.product-showcase-container .product-slide {
  max-height: 980px;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  overflow: hidden;
}

.product-showcase-container .product-slide.active {
  display: flex;
  opacity: 1;
  flex-direction: column;
}

.product-showcase-container .product-content {
  display: flex;
  flex-direction: row;
  gap: 30px;
  justify-content: center;
  align-items: center;
}

/* =============================================================================
   主图片容器
   ============================================================================= */
.product-showcase-container .main-image-container {
  flex: 0 0 40%;
  position: relative;
  overflow: hidden;
  max-height: 700px;
  min-height: 300px;
  min-width: 0;
  aspect-ratio: var(--image-ratio, 3/4);
}

.product-showcase-container .main-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--image-fit, cover);
  object-position: var(--image-position, center center);
}

/* =============================================================================
   产品容器区域
   ============================================================================= */
.product-showcase-container .bags-container {
  flex: 0 0 35%;
  padding: 0 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
}

/* =============================================================================
   产品卡片样式
   ============================================================================= */
.product-card-wrapper {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.product-card-wrapper.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.product-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgb(var(--color-image-background));
  display: block;
  text-decoration: none;
}

.product-title-link {
  text-decoration: none;
  color: rgb(var(--color-text));
}

.product-title-link .product-title {
  color: rgb(var(--color-text));
  margin: 0;
}

.product-title-link:hover .product-title {
  color: rgba(var(--color-text), 0.7);
  transition: color 0.3s ease;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.product-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  color: rgb(var(--color-text));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

.product-card-footer {
  padding: 0.75rem 0 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

/* =============================================================================
   产品徽章样式
   ============================================================================= */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(var(--color-button-text));
  border-radius: var(--product-discount-radius, 4px);
  z-index: 2;
}

.product-badge.sale-badge {
  background: rgb(var(--color-sale-badge, 231, 76, 60));
}

.product-badge.sold-out-badge {
  background: rgb(var(--color-sold-out-badge, 149, 165, 166));
}

.product-badge.custom-badge {
  background: rgb(var(--color-custom-badge, 39, 174, 96));
}

/* =============================================================================
   快速购买按钮
   ============================================================================= */
.product-quick-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.product-card:hover .product-quick-actions {
  opacity: 1;
  transform: translateY(0);
}

.product-card:hover .product-quick-actions .product-quick-add-btn svg {
  transform: rotate(90deg);
}

.product-quick-actions .product-quick-add-btn {
  opacity: 1;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none;
  padding: 0;
  list-style: none;
  text-decoration: none;
  color: inherit;
}

.product-quick-actions .product-quick-add-btn::-webkit-details-marker {
  display: none;
}

.product-quick-actions .product-quick-add-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.product-quick-actions .product-quick-add-btn svg {
  width: 18px;
  height: 18px;
  stroke: rgb(var(--color-foreground));
  transition: transform 0.3s ease;
}

.product-quick-actions .product-quick-add-btn .icon-loading {
  display: none;
}

.product-quick-actions .product-quick-add-btn.loading .icon-quick-add {
  display: none;
}

.product-quick-actions .product-quick-add-btn.loading .icon-loading {
  display: block;
  animation: animation-button-loading linear 1.5s infinite;
}

/* =============================================================================
   导航控制元素
   ============================================================================= */
.product-showcase-container .dots-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.product-showcase-container .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(var(--color-foreground), 0.3);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  position: relative;
}

.product-showcase-container .dot::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  bottom: -0.5rem;
  left: -0.5rem;
}

.product-showcase-container .dot:hover {
  background-color: rgba(var(--color-foreground), 0.6);
  transform: scale(1.3);
}

.product-showcase-container .dot.active {
  background-color: rgb(var(--color-foreground));
  transform: scale(1.5);
}

/* =============================================================================
   呼吸点样式和动画
   ============================================================================= */
.product-showcase-container .coordinate-point,
.coordinate-point {
  position: absolute !important;
  width: 14px !important;
  height: 14px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: 10 !important;
  animation: breathingGlow 3s ease-in-out infinite !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.product-showcase-container .coordinate-point:hover {
  background: rgba(255, 255, 255, 1);
  transform: translate(-50%, -50%) scale(1.15);
}

.product-showcase-container .coordinate-point.active {
  background: rgba(255, 255, 255, 1);
  animation: activeBreathing 2.5s ease-in-out infinite;
}

@keyframes breathingGlow {
  0%, 100% {
    box-shadow: 
      0 0 0 4px rgba(255, 255, 255, 0.4),
      0 0 12px 6px rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow: 
      0 0 0 10px rgba(255, 255, 255, 0.15),
      0 0 18px 8px rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes activeBreathing {
  0%, 100% {
    box-shadow: 
      0 0 0 5px rgba(255, 255, 255, 0.6),
      0 0 16px 8px rgba(255, 255, 255, 0.35);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow: 
      0 0 0 14px rgba(255, 255, 255, 0.2),
      0 0 24px 10px rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* =============================================================================
   轮播按钮
   ============================================================================= */
.product-showcase-container .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 1;
  transition: opacity 0.3s ease;
  border: none;
  outline: none;
  overflow: hidden;
  box-shadow: 0 .125rem .625rem rgb(28,28,28,.15);
  z-index: 100;
}

.product-showcase-container .carousel-btn.prev-btn {
  left: 20px;
}

.product-showcase-container .carousel-btn.next-btn {
  right: 20px;
}

/* =============================================================================
   底部按钮样式
   ============================================================================= */
.product-showcase-container .product-showcase-footer-btn {
  margin: 30px auto 10px;
  display: flex;
  justify-content: center;
}

.product-showcase-cta,
.product-showcase-container .footer-button {
  border-radius: 0 !important;
}

/* =============================================================================
   移动端专用样式
   ============================================================================= */

/* 移动端显示/隐藏控制 */
@media (max-width: 1024px) {
  .product-showcase-container .mobile-showcase {
    display: block !important;
  }
  
  .product-showcase-container .desktop-showcase {
    display: none !important;
  }
  
  .product-showcase-container .carousel-btn {
    display: none !important;
  }
  
  .product-showcase-container .coordinate-point {
    display: none;
  }
  
  .product-showcase-container .product-showcase-view {
    padding: 20px 0;
    min-height: auto;
  }
}

@media (min-width: 1025px) {
  .product-showcase-container .mobile-showcase {
    display: none !important;
  }
  
  .product-showcase-container .desktop-showcase {
    display: block !important;
  }
}

/* 移动端图片滑动容器 */
@media (max-width: 1024px) {
  .product-showcase-container .mobile-showcase .mobile-image-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 30px;
    width: 100%;
    position: relative;
    padding-left: 30px;
    padding-right: 30px;
  }

  .product-showcase-container .mobile-showcase .mobile-image-slider::-webkit-scrollbar {
    display: none;
  }

  .product-showcase-container .mobile-showcase .mobile-image-item {
    flex: 0 0 calc(100vw - 60px);
    scroll-snap-align: center;
    position: relative;
    overflow: hidden;
    margin-right: 15px;
    aspect-ratio: var(--mobile-image-ratio);
  }

  .product-showcase-container .mobile-showcase .mobile-image-item:last-child {
    margin-right: 30px;
  }

  .product-showcase-container .mobile-showcase .mobile-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
  }

  /* 移动端产品容器 */
  .mobile-products-container {
    width: calc(100vw - 20px);
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 0px;
    padding: 0;
  }

  .mobile-footer-button {
    width: calc(100vw - 60px);
    margin-left: 30px;
    margin-right: 30px;
    padding: 0;
  }
}

/* 移动端产品卡片样式 */
@media (max-width: 1024px) {
  .mobile-product-group {
    display: none;
  }

  .mobile-product-group.active {
    display: block;
  }

  .mobile-product-card {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    margin-bottom: 15px;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .mobile-product-card.highlighted {
    background: rgba(var(--color-background), 0.95);
    border: 2px solid rgb(var(--color-foreground));
    transform: scale(1.02);
    transition: all 0.3s ease;
  }

  .mobile-product-image {
    position: relative;
    flex: 0 0 80px;
  }

  .mobile-product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
  }

  .mobile-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
  }
  
  .mobile-product-badge:empty {
    display: none;
  }

  .mobile-product-badge.sale-badge {
    background: #e74c3c;
  }

  .mobile-product-badge.sold-out-badge {
    background: #95a5a6;
  }

  .mobile-product-badge.custom-badge {
    background: #27ae60;
  }

  .mobile-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .mobile-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: rgb(var(--color-text));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    text-overflow: ellipsis;
  }

  .mobile-product-price {
    font-size: 18px;
    font-weight: 700;
    color: rgb(var(--color-text));
    margin: 0 0 10px 0;
  }

  .mobile-view-product-btn {
    width: auto !important;
    max-width: 120px !important;
    min-width: 100px !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
  }

  .mobile-main-cta {
    display: block;
    width: 100%;
    background: rgb(var(--color-button-background));
    color: rgb(var(--color-button-text));
    text-decoration: none;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
  }

  .mobile-main-cta:hover {
    background: rgba(var(--color-button-background), 0.85);
  }
}

/* =============================================================================
   平板特定优化
   ============================================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .product-showcase-container .mobile-showcase .mobile-image-item {
    flex: 0 0 calc(100vw - 80px);
  }

  .mobile-products-container {
    width: calc(100vw - 80px);
  }

  .mobile-footer-button {
    width: calc(100vw - 80px);
  }
}

/* =============================================================================
   小屏手机优化
   ============================================================================= */
@media (max-width: 480px) {
  .product-showcase-container .mobile-showcase .mobile-image-item {
    height: 450px;
  }

  .product-quick-actions .product-quick-add-btn {
    width: 36px;
    height: 36px;
  }
  
  .product-quick-actions .product-quick-add-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* =============================================================================
   按钮文字大小控制（btn--text-size-* 类）
   覆盖 base CSS 的 font-size: 12px !important
   ============================================================================= */
.product-showcase .btn.btn--text-size-caption .button {
  font-size: var(--font-size-caption, 0.75rem) !important;
}
.product-showcase .btn.btn--text-size-body .button {
  font-size: var(--font-size-body, 1rem) !important;
}
.product-showcase .btn.btn--text-size-title4 .button {
  font-size: var(--font-size-title4, 1.125rem) !important;
}
.product-showcase .btn.btn--text-size-title3 .button {
  font-size: var(--font-size-title3, 1.25rem) !important;
}

/* =============================================================================
   大屏幕优化
   ============================================================================= */
@media (min-width: 1400px) {
  .product-showcase-container .carousel-btn.prev-btn {
    left: 30px;
  }
  
  .product-showcase-container .carousel-btn.next-btn {
    right: 30px;
  }
}