/* 捆绑产品购买组件样式 */
.bundle-product-container {
  margin: 20px 0;
  padding: 0;
}

/* 顶部标题 */
.bundle-product-header {
  text-align: center;
  margin-bottom: 8px;
  position: relative;
  padding: 12px 0;
}

.bundle-product-divider {
  height: 1px;
  background-color: #e5e5e5;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  z-index: 1;
}

.bundle-product-title {
  font-size: 16px;
  font-weight: 600;
  color: #000;
  text-transform: uppercase;
  margin: 0;
  position: relative;
  z-index: 2;
  background: #FBFBFB;
  padding: 0 10px;
  display: inline-block;
}

/* 捆绑产品组件样式 */
.bundle-product-wrapper {
  margin: 0 0 20px;
  padding: 0;
}

/* 选项容器 */
.bundle-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 选项项 */
.bundle-option-item {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 18px 16px;
  background: #fff;
  transition: all 0.3s ease;
  margin-bottom: 0;
}

.bundle-option-item:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bundle-option-item.bundle-selected {
  border-color: #4a3c8c;
  border-width: 2px;
  background: #faf9ff;
  box-shadow: 0 2px 12px rgba(74, 60, 140, 0.1);

}

.bundle-option-item.bundle-selected {

}

.bundle-option-item.bundle-selected:hover {
  border-color: #4a3c8c;
  box-shadow: 0 2px 16px rgba(74, 60, 140, 0.15);
}

.option-label-wrapper {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

/* 单选按钮包装器 */
.radio-wrapper {
  position: relative;
  margin-top: 0;
}

.radio-wrapper input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-indicator {
  width: 22px;
  height: 22px;
  border: 2px solid #ccc;
  border-radius: 50%;
  background: #fff;
  transition: all 0.2s ease;
  display: block;
}

.radio-indicator.radio-checked {
  border-color: #4a3c8c;
  background: #4a3c8c;
  position: relative;
}

.radio-indicator.radio-checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
}

/* 选项内容 - 上下布局 */
.bundle-option-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 上半部分：标题描述（左）+ 价格（右） */
.option-top-section {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 0;
}

/* 左侧内容容器 */
.option-left-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

/* 选项头部 */
.option-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.option-type {
  font-size: 16px;
  font-weight: 600;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.option-save {
  font-size: 15px;
  font-weight: 600;
  color: #4a3c8c;
}
.option-product-price {
  font-size: 14px;
}

/* 产品名称 */
.option-product-name {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
  margin-top: 2px;
}

/* 价格区域 - 右对齐 */
.option-prices {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.option-prices .current-price {
  font-size: 18px;
  font-weight: 600;
  color: #000;
}

.option-prices .original-price {
  font-size: 15px;
  color: #999;
  text-decoration: line-through;
}

/* 下半部分：商品item容器 */
.option-bottom-section {
  margin-top: 16px;
  display: none;
}

.bundle-selected .option-bottom-section {
  display: block;
}

/* Bundle产品网格 - 竖向展示 */
.bundle-products-grid {
  display: grid;
  grid-template-rows: auto auto;
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid #e5e5e5;
  position: relative;
}

.bundle-product-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
  padding: 8px 0;
  position: relative;
  z-index: 2;
}

/* 第一个卡片底部添加分割线 */
.bundle-product-card:first-child {
  position: relative;
}

.product-image {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-image:hover img {
  transform: scale(1.05);
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.product-name {
  font-size: 13px;
  font-weight: 500;
  color: #000;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 变体选择 */
.product-variants {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.variant-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 120px;
}

.variant-row label {
  font-size: 15px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
}

.variant-select {
  flex: 1;
  padding: 6px 11px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 15px;
  color: #000;
  background: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 10 10'%3E%3Cpath fill='%23666' d='M5 7.5L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 26px;
  min-width: 0;
  transition: all 0.2s ease;
}

.variant-select:hover {
  border-color: #4a3c8c;
  background-color: #fafafa;
}

.variant-select:focus {
  outline: none;
  border-color: #4a3c8c;
  box-shadow: 0 0 0 2px rgba(74, 60, 140, 0.1);
}

/* 加号 */
.bundle-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #999;
  font-weight: 300;
  align-self: center;
}

.product-bundle-button {
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 响应式设计 */
@media screen and (max-width: 959px) {
  .header-title {
    font-size: 14px;
  }

  .bundle-option-item {
    padding: 14px 12px;
  }

  .option-top-section {
    gap: 8px;
  }

  .option-prices {
    margin-left: 0;
    align-self: flex-start;
  }

  .option-bottom-section {
    margin-top: 12px;
    padding-top: 12px;
  }

  .option-type {
    font-size: 14px;
  }

  .option-save {
    font-size: 13px;
  }

  .option-product-name {
    font-size: 13px;
  }

  .option-prices .current-price {
    font-size: 16px;
  }

  .option-prices .original-price {
    font-size: 13px;
  }

  .bundle-products-grid {
    grid-template-rows: auto auto;
    gap: 0;
    padding-top: 16px;
    margin-top: 16px;
  }

  /* 移动端保留横线 */
  .bundle-products-grid::before {
    display: block;
    height: 1px;
  }

  .bundle-product-card {
    grid-template-columns: 80px 1fr;
    gap: 10px;
    padding: 6px 0;
  }

  .product-image {
    width: 80px;
    height: 80px;
  }

  .product-name {
    font-size: 12px;
  }

  .product-prices .current-price {
    font-size: 13px;
  }

  .product-prices .original-price {
    font-size: 11px;
  }

  .product-variants {
    flex-direction: column;
    gap: 6px;
  }

  .variant-row {
    min-width: auto;
  }

  .bundle-plus {
    display: none;
  }

  .radio-indicator {
    width: 20px;
    height: 20px;
  }

  .radio-indicator.radio-checked::after {
    width: 8px;
    height: 8px;
  }
}

@media screen and (max-width: 480px) {
  .bundle-option-item {
    padding: 12px 10px;
  }

  .option-top-section {
    gap: 6px;
  }

  .option-bottom-section {
    margin-top: 10px;
    padding-top: 10px;
  }

  .bundle-product-card {
    grid-template-columns: 70px 1fr;
    gap: 8px;
  }

  .product-image {
    width: 70px;
    height: 70px;
  }

  .product-variants {
    flex-direction: column;
  }

  .variant-select {
    font-size: 14px;
    padding: 8px 18px 8px 11px;
  }

  .option-prices {
    align-self: flex-start;
  }
}