/**
 * CSS Fix per problemi pagina prodotto
 */

/* ============================================
   FIX 1: Input quantità - previeni modifiche visuali e FORZA VISIBILITÀ TESTO
   ============================================ */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
}

/* Stabilizza l'input durante lo scroll */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.bootstrap-touchspin input[type="number"] {
    pointer-events: auto !important;
}

/* FORZA COLORE E VISIBILITÀ DEL TESTO NELL'INPUT QUANTITÀ */
#quantity_wanted,
input[name="qty"],
.product-add-to-cart input[type="number"],
.bootstrap-touchspin input[type="number"],
.qty input[type="number"] {
    color: #000000 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    text-align: center !important;
}

/* Forza visibilità anche in focus, hover, e tutti gli stati */
#quantity_wanted:focus,
#quantity_wanted:hover,
#quantity_wanted:active,
input[name="qty"]:focus,
input[name="qty"]:hover,
input[name="qty"]:active,
.product-add-to-cart input[type="number"]:focus,
.product-add-to-cart input[type="number"]:hover,
.bootstrap-touchspin input[type="number"]:focus,
.bootstrap-touchspin input[type="number"]:hover {
    color: #000000 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
}

/* Assicura che il placeholder sia visibile ma distinto */
#quantity_wanted::placeholder,
input[name="qty"]::placeholder,
.product-add-to-cart input[type="number"]::placeholder {
    color: #999999 !important;
    opacity: 0.5 !important;
}

/* Fix specifico per Safari che a volte nasconde il testo */
@supports (-webkit-appearance: none) {
    #quantity_wanted,
    input[name="qty"],
    .product-add-to-cart input[type="number"] {
        -webkit-appearance: none !important;
        -webkit-text-fill-color: #000000 !important;
    }
}

/* ============================================
   FIX 2: Disabilita completamente zoom immagini
   ============================================ */
.tv-product-page-image img,
.product-cover img,
.js-qv-product-cover,
.product-images img,
#product-images-thumbs img {
    transform: none !important;
    transition: none !important;
    cursor: default !important;
}

/* Disabilita hover zoom effect */
.tv-product-page-image:hover img,
.product-cover:hover img,
.js-qv-product-cover:hover img {
    transform: scale(1) !important;
    transform: none !important;
}

/* Previeni zoom container */
.product-images {
    overflow: hidden;
    position: relative;
}

.product-images img {
    max-width: 100%;
    height: auto;
}

/* Rimuovi cursor zoom */
.js-zoom-enabled,
.zoom-enabled {
    cursor: default !important;
}

/* Disabilita eventuali lenti di ingrandimento */
.zoomContainer,
.zoomWindow,
.zoom-lens {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ============================================
   Miglioramenti generali UI
   ============================================ */
.product-add-to-cart .qty input {
    text-align: center;
    font-weight: 600;
}

/* Assicura che il prezzo sia sempre visibile */
.product-prices {
    font-size: 1.2em;
    font-weight: bold;
}

/* ============================================
   FIX 3: Disabilita theiaStickySidebar
   ============================================ */
.theiaStickySidebar {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.tv-product-page-image .theiaStickySidebar {
    position: static !important;
}

.tv-product-page-image,
.product-images,
.product-cover,
.product-cover-wrapper {
    position: static !important;
    position: relative !important;
    top: auto !important;
}

.col-md-6.tv-product-page-image {
    position: static !important;
}
.btn-add-to-cart.btn-disabled,
.btn-add-to-cart:disabled {
    background-color: #cccccc !important;
    border-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn-add-to-cart.btn-disabled:hover,
.btn-add-to-cart:disabled:hover {
    background-color: #cccccc !important;
    border-color: #cccccc !important;
}

/* Pulsante Aggiungi al Carrello Custom */
.rey-cart-button {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: #0071bc !important;
    border: 2px solid #0071bc !important;
    color: white !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rey-cart-button:hover {
    background-color: #005a9c !important;
    border-color: #005a9c !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 113, 188, 0.3);
}

.rey-cart-button:active {
    transform: translateY(0);
}

/* Stato disabilitato/non disponibile */
.rey-cart-button:disabled,
.rey-cart-button.btn-not-available {
    background-color: #8B0000 !important;
    border-color: #8B0000 !important;
    cursor: not-allowed !important;
    opacity: 0.9 !important;
    transform: none !important;
    box-shadow: none !important;
}

.rey-cart-button:disabled:hover,
.rey-cart-button.btn-not-available:hover {
    background-color: #8B0000 !important;
    border-color: #8B0000 !important;
    transform: none !important;
}