.single-product form.cart:not(.grouped_form):not(.variations_form) .quantity,
.single-product form.cart.variations_form .woocommerce-variation-add-to-cart .quantity {
    margin-right: 0 !important;
    margin-bottom: 0 !important;
}

.single-product form.cart .woocommerce-variation-add-to-cart,
.single-product form.cart:not(.variations_form) {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
}

.single-product .quantity {
    display: flex !important;
    align-items: center !important;
    border: 1.5px solid #E5E7EB !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #fff !important;
    height: 48px !important;
    flex-shrink: 0 !important;
}

.single-product .quantity .qty {
    width: 45px !important;
    height: 100% !important;
    text-align: center !important;
    border: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    background: #fff !important;
    -moz-appearance: textfield !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.single-product .quantity .qty::-webkit-outer-spin-button,
.single-product .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.single-product .quantity .qty:focus {
    outline: none !important;
    box-shadow: none !important;
}

.single-product .quantity .plus,
.single-product .quantity .minus,
.single-product .quantity input[type="button"] {
    width: 36px !important;
    height: 100% !important;
    background: #F9FAFB !important;
    border: none !important;
    font-size: 16px !important;
    color: #6B7280 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.single-product .quantity .plus:hover,
.single-product .quantity .minus:hover,
.single-product .quantity input[type="button"]:hover {
    background: #F3F4F6 !important;
    color: #374151 !important;
}

.single-product .quantity .minus {
    border-right: 1px solid #E5E7EB !important;
}

.single-product .quantity .plus {
    border-left: 1px solid #E5E7EB !important;
}

.single-product .single_add_to_cart_button {
    flex: 1 !important;
    min-width: 160px !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #2563EB !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 0 20px !important;
    height: 48px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.single-product .single_add_to_cart_button:hover {
    background: #1D4ED8 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.single-product .single_add_to_cart_button:active {
    background: #1E40AF !important;
}

.single-product .single_add_to_cart_button .tkai-btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 15px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.single-product .single_add_to_cart_button .tkai-btn-icon i {
    font-size: 15px !important;
    line-height: 1 !important;
}

.single-product .single_add_to_cart_button .tkai-btn-text {
    font-size: 15px;
    font-weight: 600;
}

.single-product .single_add_to_cart_button.disabled,
.single-product .single_add_to_cart_button:disabled,
.single-product .single_add_to_cart_button.wc-variation-selection-needed {
    background: #9CA3AF !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.8 !important;
    pointer-events: auto !important;
}

.tkai-error-message {
    display: none;
    align-items: center;
    gap: 10px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 4px solid #EF4444;
    color: #DC2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.tkai-error-message.show {
    display: flex;
    animation: tkai-shake-fade 0.4s ease;
}

.tkai-error-message svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

@keyframes tkai-shake-fade {
    0% { opacity: 0; transform: translateX(-10px); }
    30% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    100% { opacity: 1; transform: translateX(0); }
}

.single-product .variations select.tkai-hidden-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.tkai-variation-buttons-wrapper {
    margin-bottom: 20px;
}

.tkai-variation-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    display: block;
}

.tkai-variation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tkai-variation-btn {
    padding: 8px 16px;
    border: 1.5px solid #D1D5DB;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}

.tkai-variation-btn:hover:not(.disabled):not(.active) {
    border-color: #2563EB;
    color: #2563EB;
    background: #EFF6FF;
}

.tkai-variation-btn.active {
    border-color: #2563EB;
    background: #EFF6FF;
    color: #1D4ED8;
    font-weight: 600;
    box-shadow: 0 0 0 1px #2563EB;
}

.tkai-variation-btn.disabled {
    background: #F3F4F6 !important;
    color: #9CA3AF !important;
    border-color: #E5E7EB !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    text-decoration: line-through !important;
    pointer-events: none !important;
}

.single-product .variations .label {
    display: none !important;
}

.single-product .variations .reset_variations,
.single-product .reset_variations {
    display: none !important;
    visibility: hidden !important;
}

.single-product .variations td.value {
    position: relative;
}

@media (max-width: 480px) {
    .single-product form.cart .woocommerce-variation-add-to-cart,
    .single-product form.cart:not(.variations_form) {
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }
    
    .single-product .quantity {
        height: 44px !important;
    }
    
    .single-product .quantity .qty {
        width: 40px !important;
        font-size: 14px !important;
    }
    
    .single-product .quantity .plus,
    .single-product .quantity .minus {
        width: 32px !important;
    }
    
    .single-product .single_add_to_cart_button {
        flex: 1 !important;
        min-width: 120px !important;
        height: 44px !important;
        font-size: 14px !important;
        padding: 0 16px !important;
    }
    
    .single-product .single_add_to_cart_button .tkai-btn-icon {
        font-size: 14px !important;
    }
    
    .single-product .single_add_to_cart_button .tkai-btn-text {
        font-size: 14px !important;
    }
}

@media (max-width: 360px) {
    .single-product .quantity .qty {
        width: 35px !important;
    }
    
    .single-product .quantity .plus,
    .single-product .quantity .minus {
        width: 28px !important;
    }
    
    .single-product .single_add_to_cart_button {
        min-width: 100px !important;
        padding: 0 12px !important;
    }
}

/**
 * ================================
 * GIÁ SẢN PHẨM TO HƠN
 * ================================
 */
.single-product .summary .price,
.single-product .summary .woocommerce-Price-amount {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #DC2626 !important;
}

.single-product .summary .price del {
    font-size: 18px !important;
    color: #9CA3AF !important;
    font-weight: 400 !important;
}

.single-product .summary .price ins {
    text-decoration: none !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #DC2626 !important;
}

.single-product .woocommerce-variation-price .price,
.single-product .woocommerce-variation-price .woocommerce-Price-amount {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #DC2626 !important;
}

.single-product .woocommerce-variation-price .price del {
    font-size: 18px !important;
    color: #9CA3AF !important;
}

.single-product .woocommerce-variation-price .price ins {
    text-decoration: none !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #DC2626 !important;
}