/*
Theme Name: WoodMart Child
Description: WoodMart子主题 - 自定义变体选择器
Template: woodmart
Version: 1.1.1
*/



.wd-single-variations {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.wd-single-variations .wd-swatch {
    display: block;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
}
.kaching-bundles__bundle-products {
  display: flex;
  justify-content: space-evenly;
  margin-top: 12px;
  margin-bottom: 4px;
  border: 1px solid var(--bar-border-color, rgba(0, 0, 0, .3));
  border-radius: 10px;
}

.kaching-bundles__bundle-products {
  display:flex;
  justify-content:space-evenly;
  margin-top:12px;
  margin-bottom:4px;
  border:1px solid var(--bar-border-color, rgba(0, 0, 0, .3));
  border-radius:10px
}
.kaching-bundles__bundle-products .kaching-bundles__bar-variant-selects {
  justify-content:center
}
.kaching-bundles__bundle-products.kaching-bundles__bundle-products--vertical {
  flex-direction:column
}
.kaching-bundles__bundle-products.kaching-bundles__bundle-products--vertical .kaching-bundles__bundle-products__divider {
  flex-direction:row;
  width:100%;
  height:0
}
.kaching-bundles__bundle-products.kaching-bundles__bundle-products--vertical .kaching-bundles__bundle-products__divider-line {
  width:auto;
  height:1px
}
.kaching-bundles__bundle-products.kaching-bundles__bundle-products--vertical .kaching-bundles__bundle-products__product {
  flex-direction:row;
  justify-content:space-between;
  padding:14px 12px
}
.kaching-bundles__bundle-products.kaching-bundles__bundle-products--vertical .kaching-bundles__bundle-products__pricing {
  flex-direction:column;
  align-items:flex-end
}
.kaching-bundles__bundle-products.kaching-bundles__bundle-products--vertical .kaching-bundles__bundle-products__title {
  text-align:start
}
.kaching-bundles__bundle-products.kaching-bundles__bundle-products--vertical .kaching-bundles__bundle-products__image {
  width:50px;
  height:auto;
  object-fit:contain
}
.kaching-bundles__bundle-products.kaching-bundles__bundle-products--vertical .kaching-bundles__bar-variant-selects {
  justify-content:flex-start
}
.kaching-bundles__bundle-products__divider {
  display:flex;
  flex-direction:column;
  align-items:center;
  width:0;
  overflow:visible
}
.kaching-bundles__bundle-products__divider * {
  max-width:initial
}
.kaching-bundles__bundle-products__divider-line {
  display:flex;
  flex:1;
  width:1px;
  background-color:var(--bar-border-color, rgba(0, 0, 0, .3))
}
.kaching-bundles__bundle-products__divider-icon {
  display:flex
}
.kaching-bundles__bundle-products__divider-icon svg {
  color:var(--bar-border-color, rgba(0, 0, 0, .3))
}
.kaching-bundles__bundle-products__product {
  display:flex;
  flex:1;
  flex-direction:column;
  align-items:center;
  min-width:0;
  gap:5px;
  padding:12px
}
.kaching-bundles__bundle-products__product.kaching-bundles__bundle-products__product--placeholder {
  justify-content:center;
  text-align:center;
  font-size:13px;
  font-weight:700;
  color:#555
}
.kaching-bundles__bundle-products__wrapper {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0
}
.kaching-bundles__bundle-products__content {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-width:0
}
.kaching-bundles__bundle-products__link {
  display:flex;
  flex-shrink:0;
  text-decoration:none
}
.kaching-bundles__bundle-products__image {
  flex-shrink:0;
  height:50px !important;
  width:auto;
  max-width:100%;
  border-radius:var(--kaching-bundle-products-image-border-radius, 0)
}
.kaching-bundles__bundle-products__title {
  word-break:break-word;
  text-align:center;
  font-weight:700;
  font-size:13px;
  color:var(--bar-title-color);
  font-weight:var(--bar-title-font-weight, 700);
  font-style:var(--bar-title-font-style)
}
.kaching-bundles__bundle-products__pricing {
  display:flex;
  flex-shrink:0;
  flex-wrap:wrap;
  justify-content:center;
  align-items:baseline;
  gap:5px
}
.kaching-bundles__bundle-products__price {
  font-size:13px;
  font-weight:700;
  color:var(--bar-price-color, #000)
}
.kaching-bundles__bundle-products__full-price {
  text-decoration:line-through;
  font-size:12px;
  color:var(--bar-full-price-color, #555)
}


.wd-single-variations .wd-swatch:hover {
    border-color: #000;
    background: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.wd-single-variations .wd-swatch.wd-active {
    border-color: #000;
    background: #fff;
    color: #333;
}

.wd-single-variations .wd-swatch.wd-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f8f8;
}

.wd-single-variations .wd-swatch.wd-disabled:hover {
    border-color: #e0e0e0;
    background: #f8f8f8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 添加单选按钮样式 
.wd-single-variations .wd-swatch::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: #fff;
    margin-right: 15px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}*/
.wd-single-variations  .wd-swatch-radio{
    display: flex;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #fff;
    box-sizing: border-box;
    box-shadow: 0 0 0 2px var(--bar-border-color, rgba(0, 0, 0, .3));
    margin-right: 10px;
}
.wd-single-variations .wd-active .wd-swatch-radio,
.wd-single-variations .wd-swatch.wd-active::before {
    background: #000;
    box-shadow: inset 0 0 0 1px var(--bar-selected-border-color, #000);
}


.wd-single-variations .wd-swatch:hover::before {
    border-color: #000;
}

/* 变体内容区域 */
.wd-swatch-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
}

/* 左侧内容区域 */
.wd-swatch-content-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
}

/* 第一行（标题行） */
.wd-swatch-first-line {
    display: flex;
    align-items: center;
    width: 100%;
}

/* 副标题（Save信息） */
.wd-swatch-subtitle {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
}

/* 右侧价格区域 */
.wd-swatch-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 14px;
    flex-shrink: 0;
}

/* 变体标签样式 */
.wd-swatch-label {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    margin: 0;
}

/* 价格信息样式（保持向后兼容） */
.wd-swatch-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 18px;
    color: #000;
}

.wd-price-regular {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.wd-price-sale {
    font-weight: 700;
    color: #333;
    font-size: 18px;
}

.wd-price-save {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
}

/* 选中状态下的颜色保持不变 */
.wd-single-variations .wd-swatch.wd-active .wd-swatch-label,
.wd-single-variations .wd-swatch.wd-active .wd-price-regular,
.wd-single-variations .wd-swatch.wd-active .wd-price-sale {
    color: #333;
}

.wd-single-variations .wd-swatch.wd-active .wd-price-save {
    color: #666;
    background: none;
}

/* 当有折扣时的样式调整 */
.wd-swatch-price .wd-price-save {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

/* 原价删除线样式（当显示在save信息之前时） */
.wd-swatch-price .wd-price-save::before {
    content: attr(data-regular-price);
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    font-weight: 400;
    display: block;
    margin-bottom: 2px;
}
.wd-swatch-full-price {
  font-size: 14px;
  font-weight: normal;
  font-style: normal;
  color: #555;
  text-decoration: line-through;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wd-single-variations .wd-swatch {
        min-width: 100px;
        padding: 10px 12px;
    }
    
    .wd-swatch-label {
        font-size: 14px;
    }
    
    .wd-swatch-price,
    .wd-swatch-pricing {
        font-size: 12px;
    }
    
    .wd-price-sale {
        font-size: 13px;
    }
    
    .wd-swatch-subtitle {
        font-size: 11px;
    }
    
    .wd-swatch-content-left {
        gap: 2px;
    }
}

/* 隐藏原始下拉选择器 */
.wd-single-variations select {
    display: none !important;
}

/* 单个变体时的特殊样式 */
.wd-single-variation-buttons .wd-swatch {
    font-weight: 600;
    font-size: 14px;
    background-color: #ededed;
}

.wd-single-variation-buttons .variations_form table.variations {
    margin-bottom: 20px;
}

.wd-single-variation-buttons .variations_form table.variations td.label {
    font-weight: 600;
    color: #333;
    padding-bottom: 10px;
}

/* 数量输入框样式 */
.quantity {
    display: flex;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    width: fit-content;
    margin-right: 15px;
}
.woocommerce-variation-add-to-cart .quantity{
    border: 1px solid #ddd;
}

.quantity .qty-btn {
    background: #f8f9fa;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.quantity .qty-btn:hover {
    background: #e9ecef;
    color: #333;
}

.quantity .qty-btn:active {
    background: #dee2e6;
    transform: scale(0.95);
}

.quantity .qty {
    border: none;
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
}

.quantity .qty::-webkit-outer-spin-button,
.quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity .qty:focus {
    outline: none;
    box-shadow: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quantity {
        margin-right: 10px;
    }
    
    .quantity .qty-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .quantity .qty {
        width: 50px;
        height: 35px;
        font-size: 14px;
    }
}