/* ================================================
   PAGE PRODUIT — Baillot Frères
   Quantité custom + bouton animé
   Couleurs : #A77447 (doré), #422D1C (brun foncé)
   ================================================ */

/* Form en colonne */
.woocommerce div.product form.cart {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

/* Masquer le sélecteur natif WooCommerce */
.woocommerce div.product form.cart .quantity {
    display: none !important;
}

/* ── Container quantité custom ── */
.product-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #A77447;
    border-radius: 6px;
    overflow: hidden;
    background: #A77447;
    width: 160px;
    margin-bottom: 0;
}

/* Boutons +/- */
.product-qty__btn {
    background: #A77447 !important;
    border: none !important;
    padding: 10px 16px !important;
    cursor: pointer !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1 !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    transition: background-color 0.15s ease !important;
}

.product-qty__btn:hover,
.product-qty__btn:focus,
.product-qty__btn:focus-visible,
.product-qty__btn:active {
    background: #8d6239 !important;
    color: #fff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.product-qty__btn::before,
.product-qty__btn::after {
    display: none !important;
    content: none !important;
}

/* Input quantité */
.product-qty__input {
    flex: 1 !important;
    width: 100% !important;
    text-align: center !important;
    border: none !important;
    background: #fff !important;
    color: #422D1C !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    padding: 10px 0 !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: textfield !important;
    appearance: textfield !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: "Source Sans 3", sans-serif !important;
}

.product-qty__input::-webkit-outer-spin-button,
.product-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* ── Bouton Ajouter au panier ── */
.woocommerce div.product form.cart .single_add_to_cart_button {
    background: linear-gradient(to right, #422D1C 50%, #A77447 50%) !important;
    background-size: 200% 100% !important;
    background-position: right bottom !important;
    transition: background-position 0.4s ease !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 12px 0 !important;
    width: 220px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    text-align: center !important;
    margin-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-family: "Source Sans 3", sans-serif !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
    background-position: left bottom !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
}

/* Icone panier — visible au repos */
.product-btn-cart-icon {
    display: inline-flex;
    align-items: center;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Flèche — cachée au repos */
.product-btn-arrow-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Hover : panier disparaît, flèche apparaît */
.single_add_to_cart_button:hover .product-btn-cart-icon {
    opacity: 0;
    transform: translateX(6px);
}

.single_add_to_cart_button:hover .product-btn-arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .woocommerce div.product form.cart {
        align-items: stretch !important;
    }
    .product-qty {
        width: 100% !important;
    }
    .woocommerce div.product form.cart .single_add_to_cart_button {
        width: 100% !important;
    }
    /* Désactive l'animation hover sur mobile */
    .single_add_to_cart_button:hover .product-btn-cart-icon {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    .single_add_to_cart_button:hover .product-btn-arrow-icon {
        opacity: 0 !important;
        transform: translateX(-6px) !important;
    }
}
