/**
 * Algoritmo de recomendação de produtos pós adicionar ao carrinho
 * CreatedBy: Cainhooow
 * With: KairosDev
*/

.upsell-modal-content {
    padding: 10px 0;
}

.upsell-modal-subtitle {
    color: #888;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.upsell-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .upsell-products-grid {
        grid-template-columns: 1fr;
    }
}

.upsell-product-card {
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upsell-product-card:hover {
    background: rgba(50, 50, 50, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.upsell-product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.upsell-product-name {
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 38px;
}

.upsell-product-price {
    color: #4682fa;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.upsell-product-price .woocommerce-Price-amount {
    color: #4682fa;
}

.upsell-product-price del {
    color: #666;
    font-size: 14px;
    margin-right: 8px;
}

.upsell-product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.upsell-add-to-cart {
    flex: 1;
    padding: 10px 16px;
    background: rgba(36, 36, 36, 0.9);
    border: 1px solid rgba(55, 55, 55, 0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.upsell-add-to-cart:hover:not(:disabled) {
    background: rgba(36, 36, 36, 0.9);
    transform: translateY(-1px);
}

.upsell-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.upsell-add-to-cart.added {
    background: rgba(46, 204, 113, 0.9);
    border-color: rgba(46, 204, 113, 0.5);
}

.upsell-select-options {
    text-decoration: none;
    text-align: center;
}

.upsell-view-product {
    padding: 10px 12px;
    background: rgba(60, 60, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.upsell-view-product:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.upsell-loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.upsell-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4682fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.upsell-error {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
}

.upsell-modal-footer-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.upsell-continue-shopping {
    padding: 10px 20px;
    background: rgba(60, 60, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upsell-continue-shopping:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.upsell-view-cart {
    padding: 10px 20px;
    background: rgba(36, 36, 36, 0.9);
    border: 1px solid rgba(55, 55, 55, 0.5);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.upsell-view-cart:hover {
    background: rgb(68, 68, 68);
    color: #fff;
}

/* Badge de stock */
.upsell-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(46, 204, 113, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.upsell-stock-badge.out-of-stock {
    background: rgba(231, 76, 60, 0.9);
}

/* Animação de adicionar ao carrinho */
@keyframes addToCartPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.upsell-add-to-cart.adding {
    animation: addToCartPulse 0.3s ease;
}

/* Estado de loading no botão principal */
button.single_add_to_cart_button.loading {
    opacity: 0.6;
    cursor: wait;
}

button.single_add_to_cart_button.loading:after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/**
 * Algoritmo de recomendação de produtos pós adicionar ao carrinho
 * CreatedBy: Cainhooow
 * With: KairosDev
*/