/*
Theme Name: Enfold Child
Template: enfold
Author: Khaled Diab
Version: 1.0
*/

@import url("../enfold/style.css");

/* Product attribute box styling */
#top .woocommerce-product-attributes-item {
    background-color: #ffffff !important;
    padding: 20px;
    border-radius: 8px;
}

/* Product form container styling */
#top form.cart {
    background-color: #ffffff !important;
    padding: 24px;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    margin-top: 30px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Variation dropdowns (variable products only) */
#top .variations_form.cart select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    font-size: 16px;
    margin-bottom: 16px;
    appearance: none;
}

/* Add to Cart button styling */
#top form.cart button.single_add_to_cart_button {
    background-color: #0073aa;
    color: #fff;
    font-size: 16px;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease-in-out;
    width: 100%;
}

#top form.cart button.single_add_to_cart_button:hover {
    background-color: #005f8a;
}

#top form.cart button.single_add_to_cart_button:active {
    transform: scale(0.98);
}

/* Stock & price info (variable products only) */
#top .variations_form.cart .woocommerce-variation-price,
#top .variations_form.cart .woocommerce-variation-availability {
    margin-top: 12px;
    font-weight: 500;
}

/* --- RTL-Compatible Quantity Layout and Fixes --- */
.woocommerce div.quantity {
    display: flex !important;
    flex-direction: row-reverse !important; /* RTL: + on right */
    align-items: center;
    justify-content: center;
    direction: ltr !important; /* Force logical order even in RTL mode */
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    width: fit-content !important;
    background: #f9f9f9 !important;
    box-sizing: border-box;
}

/* Quantity input field (center) */
.woocommerce div.quantity input.qty {
    order: 1 !important;
    background-color: #fff !important;
    border: none !important;
    border-left: 1px solid #ccc !important;
    border-right: 1px solid #ccc !important;
    height: 42px !important;
    width: 60px !important;
    font-size: 16px !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* + and - buttons */
.woocommerce div.quantity input.plus,
.woocommerce div.quantity input.minus {
    background-color: #eee !important;
    border: none !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 22px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    border-radius: 0 !important;
}

/* Correct order for RTL */
.woocommerce div.quantity input.plus {
    order: 0 !important; /* + on right */
}

.woocommerce div.quantity input.minus {
    order: 2 !important; /* - on left */
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    #top form.cart {
        gap: 12px;
    }

    .woocommerce div.quantity {
        width: 100%;
        justify-content: center;
    }

    #top form.cart button.single_add_to_cart_button {
        width: 100%;
    }
}
