/* 组合商品中段下拉框=============*/
/* 购物车动画效果 */
.item-count.pulse, .cart-count.pulse {
    animation: cartPulse 0.5s ease-in-out;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* VIEW CART 链接样式 */
#asnp-cart-notification a {
    color: #5D4037 !important;
    text-decoration: underline !important;
    font-weight: bold !important;
    margin-left: 10px;
}

#asnp-cart-notification a:hover {
    color: #3E2723 !important;
    text-decoration: none !important;
}

/* Bundle 产品项基础样式 左右padding=0*/
.custom-variable-interface .asnp-custom-variable-item {
    padding: 20px 0px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* 产品行 - 1:9 两列布局  全宽*/
.custom-variable-interface .asnp-product-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    align-items: flex-start;   /* 顶端对齐 */
    height: 210px;             /* 固定高度 */
    overflow: hidden;          /* 任何溢出都隐藏 */
}

/* 预览图列 (15%) */
.custom-variable-interface .asnp-preview-column {
    flex: 0 0 320px;
    height: 210px;
    flex-shrink: 0;
}

.custom-variable-interface .asnp-preview-container {
    text-align: center;
}

.custom-variable-interface .asnp-preview-image {
    width: 320px;
    height: 210px;
    object-fit: cover;
}

/* 内容列 (85%) 剩余全宽*/
.custom-variable-interface .asnp-content-column {
    flex: 1;
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 产品标题 */
.custom-variable-interface .asnp-product-title {
    /* 布局 */
    flex: 0 0 auto;
    margin: 0 0 0.5vh 0;
    
    /* 字体样式 */
    font-family: "trajan-pro-3", "Times New Roman", serif; /* 添加备用字体 */
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 2px;
    
    /* 文本溢出处理 */
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* 产品描述 */
.custom-variable-interface .asnp-product-info {
    flex: 0 0 60px;            /* 固定高度 */
    overflow: hidden;          /* 文字多就隐藏 */

    font-family: "avenir-next-world", sans-serif;
    font-size: 0.95em !important;
    font-weight: normal !important;
    line-height: 1.4 !important;
    
    margin: 0 !important;
    padding: 0 !important;

    min-height: 0 !important;
    max-height: 100% !important;
}

/* 选择组 - 水平排列 */
.custom-variable-interface .asnp-select-group {
    margin-top: auto;          /* 关键：压到底部 */
    width: 100%;
}

.custom-variable-interface .asnp-select-group > div {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 15px;
    align-items: end;
    width: 100%;
}

/* 表单元素容器 - 相对定位用于浮动标签 */
.custom-variable-interface .asnp-form-field {
    position: relative;
    width: 100%;
}

/* 浮动标签样式 */
.custom-variable-interface .asnp-floating-label {
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 11px;
    font-weight: bold;
    color: #000;
    background: white;
    padding: 0 4px;
    z-index: 1;
    pointer-events: none;
}

.custom-variable-interface .asnp-custom-select {
    padding: 12px 8px 8px 8px;
    width: 100%;
    border: 2px solid #D4AF37 !important;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    box-sizing: border-box;
}

.custom-variable-interface .asnp-quantity-input {
    padding: 12px 8px 8px 8px;
    width: 100%;
    border: 2px solid #D4AF37 !important;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    box-sizing: border-box;
}

.custom-variable-interface .asnp-unit-price,
.custom-variable-interface .asnp-total-price {
    padding: 12px 8px 8px 8px;
    width: 100%;
    border: 2px solid #D4AF37 !important;
    border-radius: 4px;
    color: #D4AF37;
    font-weight: bold;
    background: white;
    text-align: center;
    font-size: 14px;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-variable-interface .asnp-custom-select:focus,
.custom-variable-interface .asnp-quantity-input:focus {
    border-color: #B8860B !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* 隐藏原有的label */
.custom-variable-interface .asnp-select-group label {
    display: none;
}

/* Bundle 按钮样式 */
.custom-variable-interface .asnp-add-variable-to-cart {
    background-color: #332222 !important;
    color: #FFFFFF !important;
    border: 1px solid #1A1111 !important;
    padding: 12px 15px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    width: 100% !important;
    margin-top: 0px;
    height: 44px;
}

.custom-variable-interface .asnp-add-variable-to-cart:hover {
    background-color: #4A3333 !important;
    border-color: #2A1A1A !important;
}

.custom-variable-interface .asnp-add-variable-to-cart:disabled {
    background-color: #2A2A2A !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* 捆绑产品起始价格样式 */
.variable-starting-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #D4AF37;
    margin-bottom: 20px;
    text-align: left;
    padding: 10px 0;
    border-bottom: 2px solid #f0f0f0;
}

/* 价格加载状态 */
.variable-price-loading {
    opacity: 0.7;
    font-style: italic;
}

.variable-price-loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 强制 design your order 标题全大写 
.custom-variable-interface .variable-selection-area h3 {
    text-transform: uppercase !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 25px !important;
    text-align: center !important; 
}*/

/* 隐藏默认的bundle元素 */
#asnp_easy_product_bundle,
form.cart:not(.widget_shopping_cart form),
.product_meta,
p.stock.in-stock,
p.stock.available-on-backorder,
.ppcp-messages,
.ppc-button-wrapper {
    display: none !important;
}

/* ========== 淡金色统一替换 ========== */
:root {
  --gold-simple: #C8A756;      /* 哑金色 */
  --gold-focus:  #B5A069;      /* 焦点稍深一点，可自己调 */
}

/* 1. 所有输入框、价格框、按钮边框 */
.custom-variable-interface .asnp-custom-select,
.custom-variable-interface .asnp-quantity-input,
.custom-variable-interface .asnp-unit-price,
.custom-variable-interface .asnp-total-price,
.custom-variable-interface .asnp-custom-select:focus,
.custom-variable-interface .asnp-quantity-input:focus {
    border-color: var(--gold-simple) !important;
}

/* 2. 焦点高亮也用淡金 */
.custom-variable-interface .asnp-custom-select:focus,
.custom-variable-interface .asnp-quantity-input:focus {
    box-shadow: 0 0 0 2px rgba(184, 160, 105, .25) !important;
}

/* 3. 起始价、总价文字颜色也降饱和 */
.variable-starting-price,
.custom-variable-interface .asnp-unit-price,
.custom-variable-interface .asnp-total-price {
    color: var(--gold-simple) !important;
}

/* 4. 按钮边框（如果你想保留） */
.custom-variable-interface .asnp-add-variable-to-cart {
    border: 1px solid var(--gold-simple) !important;
}

/* ========== 去圆角 + 改细 ========== */
:root {
  --border-width: 1px;        /* 想再细就改 0.5px */
  --gold-simple: #C8A756;
}

/* 统一作用：下拉、输入、价格框 */
.custom-variable-interface .asnp-custom-select,
.custom-variable-interface .asnp-quantity-input,
.custom-variable-interface .asnp-unit-price,
.custom-variable-interface .asnp-total-price {
    border-width: var(--border-width) !important;
    border-style: solid !important;
    border-color: var(--gold-simple) !important;
    border-radius: 0 !important;     /* 关键：去圆角 */
}

/* 焦点状态也同步 */
.custom-variable-interface .asnp-custom-select:focus,
.custom-variable-interface .asnp-quantity-input:focus {
    border-width: var(--border-width) !important;
    border-color: var(--gold-focus, #B5A069) !important;
    box-shadow: 0 0 0 2px rgba(184, 160, 105, .25) !important;
}

/* ===== custom-variable-interface 移动端全面优化 (≤768px) ===== */
@media (max-width: 768px) {
    /* 1. 解除行固定高度，改为自适应 */
    .custom-variable-interface .asnp-product-row {
        flex-direction: column !important;
        gap: 20px !important;
        height: auto !important;           /* 关键：解除固定高度 */
        overflow: visible !important;
    }

    /* 2. 图片列：居中显示，控制最大宽度 */
    .custom-variable-interface .asnp-preview-column {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        height: auto !important;
    }
    .custom-variable-interface .asnp-preview-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 320 / 210 !important;  /* 保持原比例 */
        object-fit: cover !important;
    }

    /* 3. 内容列：高度自适应，移除可能导致溢出的限制 */
    .custom-variable-interface .asnp-content-column {
        flex: 0 0 auto !important;
        height: auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    /* 4. 产品标题：适当缩小，允许换行 */
    .custom-variable-interface .asnp-product-title {
        font-size: 13px !important;
        margin-bottom: 8px !important;
        white-space: normal !important;      /* 允许换行 */
        overflow: visible !important;
        text-overflow: clip !important;
    }

    /* 5. 产品描述：移除固定高度，由内容撑开 */
    .custom-variable-interface .asnp-product-info {
        flex: 0 0 auto !important;
        height: auto !important;
        max-height: none !important;
        font-size: 0.9em !important;
        margin-bottom: 15px !important;
    }

    /* 6. 选择组：取消 margin-top: auto，使用正常流 */
    .custom-variable-interface .asnp-select-group {
        margin-top: 0 !important;
        width: 100% !important;
    }

    /* 7. 选择组内部网格：改为垂直单列，适当增加间距 */
    .custom-variable-interface .asnp-select-group > div {
        display: grid !important;
        grid-template-columns: 1fr !important;  /* 单列 */
        gap: 12px !important;
        align-items: stretch !important;
    }

    /* 8. 表单元素容器：确保宽度 */
    .custom-variable-interface .asnp-form-field {
        width: 100% !important;
    }

    /* 9. 所有输入框/价格框：内边距微调，便于触摸 */
    .custom-variable-interface .asnp-custom-select,
    .custom-variable-interface .asnp-quantity-input,
    .custom-variable-interface .asnp-unit-price,
    .custom-variable-interface .asnp-total-price {
        padding: 10px 8px 6px 8px !important;   /* 调整浮动标签位置 */
        font-size: 14px !important;
        min-height: 48px !important;            /* 提高触摸区域 */
        box-sizing: border-box !important;
    }

    /* 10. 价格容器保持内联 */
    .custom-variable-interface .asnp-unit-price,
    .custom-variable-interface .asnp-total-price {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 11. “ADD TO CART” 按钮：增加高度和边距 */
    .custom-variable-interface .asnp-add-variable-to-cart {
        margin-top: 20px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        height: auto !important;
        min-height: 48px !important;
    }

    /* 12. 起始价格调整 */
    .variable-starting-price {
        font-size: 1.4em !important;
        text-align: left !important;
        padding: 10px 0 !important;
    }
}