/* 数量输入框按钮样式 */
.quantity-wrapper {
    display: grid;
    grid-template-columns: 68px 1fr 68px;
    align-items: center;
    max-width: 200px !important;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.quantity-wrapper:hover {
    border-color: #007cba;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #000000 !important;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.quantity-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.quantity-btn:hover::before {
    left: 100%;
}

.quantity-btn:hover {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #000000 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,186,0.3);
}

.quantity-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,123,186,0.3);
    color: #000000 !important;
}

.quantity-btn:disabled {
    background: #f8f9fa;
    color: #000000 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quantity-btn:disabled:hover {
    background: #f8f9fa;
    color: #000000 !important;
    transform: none;
    box-shadow: none;
}

.quantity-input {
    flex: 1;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    background: transparent;
    outline: none;
    padding: 0 8px;
    min-width: 60px;
}

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

.quantity-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quantity-wrapper {
        max-width: 120px;
    }
    
    .quantity-btn {
        width: 9px;
        height: 35px;
        font-size: 18px;
    }
    
    .quantity-input {
        height: 35px;
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.quantity-btn:not(:disabled):hover {
    animation: pulse 0.3s ease-in-out;
}

/* 成功状态 */
.quantity-wrapper.success {
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40,167,69,0.2);
}

/* 错误状态 */
.quantity-wrapper.error {
    border-color: #dc3545;
    box-shadow: 0 2px 4px rgba(220,53,69,0.2);
}

/* 快速数量按钮样式 */
.quick-quantity-buttons {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.quick-quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.quick-quantity-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.quick-quantity-btn:hover::before {
    left: 100%;
}

.quick-quantity-btn:hover {
    border-color: #007cba;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,186,0.3);
}

.quick-quantity-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,123,186,0.3);
}

.quick-quantity-btn.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-color: #28a745;
    color: white;
    animation: pulse 0.3s ease-in-out;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .quick-quantity-buttons {
        gap: 6px;
        margin-top: 12px;
    }
    
    .quick-quantity-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
        min-width: 35px;
    }
}

@media (max-width: 768px) {
    .quick-quantity-buttons {
        gap: 4px;
        margin-top: 10px;
    }
    
    .quick-quantity-btn {
        width: 30px;
        height: 30px;
        font-size: 11px;
        min-width: 30px;
    }
}

@media (max-width: 480px) {
    .quick-quantity-buttons {
        gap: 3px;
        margin-top: 8px;
    }
    
    .quick-quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
        min-width: 28px;
    }
}

/* 添加到购物车按钮样式 */
.single_add_to_cart_button {
    width: auto !important;
    min-width: 80px !important;
    max-width: calc(100% - 240px) !important;
    margin-left: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    vertical-align: bottom !important;
    align-self: center !important;
    align-content: center !important;
    align-items: center !important;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .single_add_to_cart_button {
        max-width: calc(100% - 220px) !important;
    }
}

@media (max-width: 768px) {
    .single_add_to_cart_button {
        max-width: calc(100% - 200px) !important;
        min-width: 60px !important;
    }
}

@media (max-width: 480px) {
    .single_add_to_cart_button {
        max-width: calc(100% - 180px) !important;
        min-width: 50px !important;
    }
}

