/* Container Flex per i bottoni */
.shop-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

/* Stile per i bottoni con icone */
.shop-buttons-container .button-icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    flex-shrink: 0;
}

/* Bottone Aggiungi al Carrello */
.shop-buttons-container .add-to-cart-icon {
    background-color: #27ae60;
    color: white;
}

.shop-buttons-container .add-to-cart-icon:hover {
    background-color: #229954;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

/* Bottone Visualizza Prodotto */
.shop-buttons-container .view-product-icon {
    background-color: #3498db;
    color: white;
}

.shop-buttons-container .view-product-icon:hover {
    background-color: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* Loading state */
.shop-buttons-container .button.loading {
    color: transparent;
    position: relative;
}

.shop-buttons-container .button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: white;
    animation: button-loading-spinner 1s ease infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes button-loading-spinner {
    from {
        transform: translate(-50%, -50%) rotate(0turn);
    }
    to {
        transform: translate(-50%, -50%) rotate(1turn);
    }
}

/* Messaggio "Aggiunto al carrello" */
.shop-buttons-container + .added_to_cart {
    display: block;
    text-align: center;
    margin-top: 8px;
    background-color: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 480px) {
    .shop-buttons-container .button-icon-only {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .shop-buttons-container {
        gap: 5px;
    }
}

/* Tooltip al hover */
.shop-buttons-container .button-icon-only {
    position: relative;
}

.shop-buttons-container .button-icon-only::before {
    content: attr(aria-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
    z-index: 10;
}

.shop-buttons-container .button-icon-only:hover::before {
    opacity: 1;
}
.contenuto-prodotti ul.products li.product .button, .related-products ul.products li.product .button {
    margin: 0 !important;
}