/* Fix per il layout delle schede prodotto */

/* Codice prodotto sotto al nome (homepage, listing, dettaglio, ecc.) */
.product-code {
    display: block;
    font-size: 0.78em;
    color: #555;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: -2px;
    margin-bottom: 6px;
    line-height: 1.2;
}

.product_details .product-summery .product-code {
    font-size: 0.85rem;
    color: #666;
    margin-top: -4px;
    margin-bottom: 12px;
}

/* Stili per migliorare il layout della scheda prodotto */
.single-product-view-grid-style-01.product_card .product-content,
.single-product-view-grid-style-02.product_card .product-content,
.single-product-view-grid-style-03.product_card .product-content,
.single-product-view-grid-style-04 .product-content {
    padding: 15px;
}

.single-product-view-grid-style-01.product_card .product-title,
.single-product-view-grid-style-02.product_card .product-title,
.single-product-view-grid-style-03.product_card .product-title {
    margin-bottom: 4px;
}

.single-product-view-grid-style-01.product_card .product-pricing,
.single-product-view-grid-style-02.product_card .product-pricing,
.single-product-view-grid-style-03.product_card .product-meta-and-pricing {
    margin: 4px 0 8px 0 !important;
}

.single-product-view-grid-style-01.product_card .unit_list,
.single-product-view-grid-style-02.product_card .unit_list,
.single-product-view-grid-style-03.product_card .unit_list {
    margin: 8px 0 !important;
}

/* Stili per le unità di misura con sfondo arancione */
.single-product-view-grid-style-01.product_card .unit_list .form--input,
.single-product-view-grid-style-02.product_card .unit_list .form--input,
.single-product-view-grid-style-03.product_card .unit_list .form--input {
    background-color: #ff8c00 !important;
    color: white !important;
    border: 1px solid #ff8c00 !important;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.single-product-view-grid-style-01.product_card .unit_list .form--input:hover,
.single-product-view-grid-style-02.product_card .unit_list .form--input:hover {
    background-color: #e67e00 !important;
    border-color: #e67e00 !important;
}

.single-product-view-grid-style-01.product_card .unit_list .form--input:focus,
.single-product-view-grid-style-02.product_card .unit_list .form--input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.3);
}

/* Stili per le opzioni delle unità di misura */
.single-product-view-grid-style-01.product_card .unit_list .size-lists,
.single-product-view-grid-style-02.product_card .unit_list .size-lists {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.single-product-view-grid-style-01.product_card .unit_list .size-lists li,
.single-product-view-grid-style-02.product_card .unit_list .size-lists li {
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #495057;
    list-style: none;
}

.single-product-view-grid-style-01.product_card .unit_list .size-lists li:hover,
.single-product-view-grid-style-02.product_card .unit_list .size-lists li:hover {
    background-color: #ff8c00;
    color: white;
    border-color: #ff8c00;
}

.single-product-view-grid-style-01.product_card .unit_list .size-lists li.active,
.single-product-view-grid-style-02.product_card .unit_list .size-lists li.active,
.single-product-view-grid-style-03.product_card .unit_list .size-lists li.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Allineamento migliorato per hover-content */
.single-product-view-grid-style-01.product_card .hover-content,
.single-product-view-grid-style-02.product_card .hover-content {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
}

.single-product-view-grid-style-01.product_card .cart-control,
.single-product-view-grid-style-02.product_card .cart-control {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.single-product-view-grid-style-01.product_card .cart-control .value-button,
.single-product-view-grid-style-02.product_card .cart-control .value-button {
    background-color: #f8f9fa;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-product-view-grid-style-01.product_card .cart-control .value-button:hover,
.single-product-view-grid-style-02.product_card .cart-control .value-button:hover {
    background-color: #e9ecef;
}

.single-product-view-grid-style-01.product_card .cart-control .qty_,
.single-product-view-grid-style-02.product_card .cart-control .qty_ {
    border: none;
    padding: 8px 12px;
    text-align: center;
    width: 60px;
    outline: none;
    height: 32px;
}

.single-product-view-grid-style-01.product_card .btn-wrapper,
.single-product-view-grid-style-02.product_card .btn-wrapper {
    flex: 1;
}

.single-product-view-grid-style-01.product_card .add-cart-style-01,
.single-product-view-grid-style-02.product_card .add-cart-style-02 {
    width: 100%;
    text-align: center;
    padding: 8px 16px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: block;
}

.single-product-view-grid-style-01.product_card .add-cart-style-01:hover,
.single-product-view-grid-style-02.product_card .add-cart-style-02:hover {
    background-color: #218838;
    color: white;
}

/* Nascondi l'input di selezione unità e mostra solo le opzioni */
.single-product-view-grid-style-01.product_card .unit_list .input-list,
.single-product-view-grid-style-02.product_card .unit_list .input-list {
    display: none;
}

/* Assicura che le unità di misura siano sempre visibili */
.single-product-view-grid-style-01.product_card .unit_list .size-lists,
.single-product-view-grid-style-02.product_card .unit_list .size-lists {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

/* Stili per il layout generale */
.single-product-view-grid-style-01.product_card .main-content,
.single-product-view-grid-style-02.product_card .main-content {
    text-align: left !important;
    padding: 15px !important;
}

/* Layout compatto per product-card-02 */
.single-product-view-grid-style-02.product_card .product-card-row-1 {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.single-product-view-grid-style-02.product_card .product-card-row-2 {
    width: 100%;
    margin-bottom: 8px;
}

.single-product-view-grid-style-02.product_card .unit_list {
    flex: 1;
    margin: 0 !important;
}

.single-product-view-grid-style-02.product_card .user-select-option {
    margin: 0 !important;
    display: flex;
    align-items: center;
}

/* Migliora la spaziatura tra gli elementi */
.single-product-view-grid-style-01.product_card .quantity,
.single-product-view-grid-style-02.product_card .quantity {
    margin: 4px 0 !important;
}

.single-product-view-grid-style-01.product_card .availability,
.single-product-view-grid-style-02.product_card .availability {
    margin: 4px 0 !important;
}

.single-product-view-grid-style-01.product_card .ratings,
.single-product-view-grid-style-02.product_card .ratings,
.single-product-view-grid-style-03.product_card .ratings {
    margin: 4px 0 !important;
}

/* Stili specifici per product-card-03 */
.single-product-view-grid-style-03.product_card .quantity-cart-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
}

.single-product-view-grid-style-03.product_card .user-select-option {
    margin: 0 !important;
}

.single-product-view-grid-style-03.product_card .cart-control {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.single-product-view-grid-style-03.product_card .cart-control .value-button {
    background-color: #f8f9fa;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-product-view-grid-style-03.product_card .cart-control .value-button:hover {
    background-color: #e9ecef;
}

.single-product-view-grid-style-03.product_card .cart-control .qty_ {
    border: none;
    padding: 8px 12px;
    text-align: center;
    width: 60px;
    outline: none;
    height: 32px;
}

.single-product-view-grid-style-03.product_card .btn-wrapper {
    flex: 1;
}

.single-product-view-grid-style-03.product_card .add-cart-style-02 {
    width: 100%;
    text-align: center;
    padding: 8px 16px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: block;
}

.single-product-view-grid-style-03.product_card .add-cart-style-02:hover {
    background-color: #218838;
    color: white;
}

/* Stili per product_filter_style_two_items - identici a product-card-03 */
.single-product-view-grid-style-04 .product-title {
    margin-bottom: 4px;
}

.single-product-view-grid-style-04 .product-meta-and-pricing {
    margin: 4px 0 8px 0 !important;
}

.single-product-view-grid-style-04 .unit_list {
    margin: 8px 0 !important;
}

.single-product-view-grid-style-04 .unit_list .form--input {
    background-color: #ff8c00 !important;
    color: white !important;
    border: 1px solid #ff8c00 !important;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.single-product-view-grid-style-04 .unit_list .form--input:hover {
    background-color: #e67e00 !important;
    border-color: #e67e00 !important;
}

.single-product-view-grid-style-04 .unit_list .size-lists {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.single-product-view-grid-style-04 .unit_list .size-lists li {
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #FFF;
    list-style: none;
}

.single-product-view-grid-style-04 .unit_list .size-lists li:hover {
    background-color: #ff8c00;
    color: white;
    border-color: #ff8c00;
}

.single-product-view-grid-style-04 .unit_list .size-lists li.active {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.single-product-view-grid-style-04 .user-select-option {
    margin: 0 !important;
}

.single-product-view-grid-style-04 .cart-control {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.single-product-view-grid-style-04 .cart-control .value-button {
    background-color: #f8f9fa;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-product-view-grid-style-04 .cart-control .value-button:hover {
    background-color: #e9ecef;
}

.single-product-view-grid-style-04 .cart-control .qty_ {
    border: none;
    padding: 8px 12px;
    text-align: center;
    width: 60px;
    outline: none;
    height: 32px;
}

.single-product-view-grid-style-04 .btn-wrapper {
    flex: 1;
}

.single-product-view-grid-style-04 .add-cart-style-02 {
    width: 100%;
    text-align: center;
    padding: 8px 16px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: block;
}

.single-product-view-grid-style-04 .add-cart-style-02:hover {
    background-color: #218838;
    color: white;
}

.single-product-view-grid-style-04 .unit_list .input-list {
    display: none;
}

.single-product-view-grid-style-04 .unit_list .size-lists {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

/* Fix per il carrello - assicura che l'input quantità sia sempre visibile */
.cart-inner-content .cart-control input,
.cart-inner-content .cart-control .qty_,
.cart-inner-content table tbody tr td.quantity .cart-control input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100px !important;
    height: 40px !important;
    font-size: 16px !important;
    text-align: center !important;
    border: 1px solid #dee2e6 !important;
    background-color: white !important;
    color: #495057 !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Fix per i pulsanti del carrello - assicura che non nascondano l'input */
.cart-inner-content .cart-control .value-button,
.cart-inner-content .cart-control .minus,
.cart-inner-content .cart-control .plus {
    position: absolute !important;
    z-index: 2 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.cart-inner-content .cart-control .minus {
    left: -15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.cart-inner-content .cart-control .plus {
    right: -15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.cart-inner-content .cart-control .value-button:hover,
.cart-inner-content .cart-control .minus:hover,
.cart-inner-content .cart-control .plus:hover {
    background-color: #e9ecef !important;
}

/* Stili per la pagina di dettaglio prodotto - pulsanti quantità più piccoli */
.shop-details-area-wrapper .cart-control {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
}

.shop-details-area-wrapper .cart-control .value-button {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    border: 1px solid #dee2e6 !important;
    background-color: #f8f9fa !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.shop-details-area-wrapper .cart-control .value-button:hover {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.shop-details-area-wrapper .cart-control .qty_ {
    width: 60px !important;
    height: 32px !important;
    font-size: 14px !important;
    text-align: center !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 0 8px !important;
}

.shop-details-area-wrapper .user-select-option {
    margin-bottom: 20px !important;
}

.shop-details-area-wrapper .btn-and-fav {
    margin-top: 15px !important;
}

/* Stili per le unità di misura nella pagina di dettaglio */
.shop-details-area-wrapper .unit_list {
    margin-bottom: 20px !important;
}

.shop-details-area-wrapper .unit_list .form--input {
    background-color: #ff8c00 !important;
    color: white !important;
    border: 1px solid #ff8c00 !important;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.shop-details-area-wrapper .unit_list .form--input:hover {
    background-color: #e67e00 !important;
    border-color: #e67e00 !important;
}

.shop-details-area-wrapper .unit_list .size-lists {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.shop-details-area-wrapper .unit_list .size-lists li {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #495057;
    list-style: none;
    margin-right: 8px;
    margin-bottom: 8px;
}

.shop-details-area-wrapper .unit_list .size-lists li:hover {
    background-color: #ff8c00;
    color: white;
    border-color: #ff8c00;
}

.shop-details-area-wrapper .unit_list .size-lists li.active {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

/* Stile più specifico per assicurare che la classe active sia visibile */
.shop-details-area-wrapper .unit_list .size-lists li.active,
.shop-details-area-wrapper .size-lists li.active {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3) !important;
}

.shop-details-area-wrapper .unit_list .input-list {
    display: none;
}

.shop-details-area-wrapper .unit_list .size-lists {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
