/**
 * ==========================================
 * GSTORE ADD TO CART TOAST
 * ==========================================
 * Modal/Toast de notificação quando produto é
 * adicionado ao carrinho.
 */

/* ==========================================
   CONTAINER DO TOAST
   ========================================== */
.Gstore-cart-toast {
    position: fixed;
    top: 100px;
    right: 24px;
    z-index: 9999;
    
    /* Layout */
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 380px;
    max-width: calc(100vw - 48px);
    
    /* Visual */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    
    /* Animação inicial */
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    transition: 
        opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Estado visível */
.Gstore-cart-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Estado de saída */
.Gstore-cart-toast.is-exiting {
    opacity: 0;
    transform: translateX(100%);
}

/* ==========================================
   HEADER DO TOAST
   ========================================== */
.Gstore-cart-toast__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 0;
}

.Gstore-cart-toast__status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.Gstore-cart-toast__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    flex-shrink: 0;
}

.Gstore-cart-toast__icon svg {
    width: 16px;
    height: 16px;
}

.Gstore-cart-toast__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Botão de fechar */
.Gstore-cart-toast__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.Gstore-cart-toast__close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.Gstore-cart-toast__close:active {
    transform: scale(0.95);
}

.Gstore-cart-toast__close svg {
    width: 18px;
    height: 18px;
}

/* ==========================================
   CONTEÚDO DO PRODUTO
   ========================================== */
.Gstore-cart-toast__content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    margin: 0 0;
}

.Gstore-cart-toast__image {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Gstore-cart-toast__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.Gstore-cart-toast__details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.Gstore-cart-toast__product-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.Gstore-cart-toast__product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.Gstore-cart-toast__product-price {
    font-weight: 600;
    color: var(--gstore-cart-green, #5a8900);
}

.Gstore-cart-toast__product-qty {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5563;
}

/* ==========================================
   FOOTER COM AÇÕES
   ========================================== */
.Gstore-cart-toast__footer {
    display: flex;
    gap: 10px;
    padding: 0 20px 16px;
}

.Gstore-cart-toast__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.Gstore-cart-toast__btn:active {
    transform: scale(0.98);
}

/* Botão continuar comprando */
.Gstore-cart-toast__btn--continue {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.Gstore-cart-toast__btn--continue:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

/* Botão ver carrinho */
.Gstore-cart-toast__btn--cart {
    background: var(--gstore-cart-green, #5a8900);
    border: 1px solid var(--gstore-cart-green, #5a8900);
    color: #ffffff;
}

.Gstore-cart-toast__btn--cart:hover {
    background: var(--gstore-cart-green-hover, #4f7900);
    border-color: var(--gstore-cart-green-hover, #4f7900);
    color: #ffffff;
}

.Gstore-cart-toast__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================
   BARRA DE PROGRESSO
   ========================================== */
.Gstore-cart-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e5e7eb;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.Gstore-cart-toast__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gstore-cart-green, #5a8900), #22c55e);
    width: 100%;
    transform-origin: left;
    transition: transform 0.1s linear;
}

.Gstore-cart-toast.is-visible .Gstore-cart-toast__progress-bar {
    animation: progressShrink var(--toast-duration, 5s) linear forwards;
}

.Gstore-cart-toast:hover .Gstore-cart-toast__progress-bar {
    animation-play-state: paused;
}

@keyframes progressShrink {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* ==========================================
   ESCONDER LINK PADRÃO DO WOOCOMMERCE
   ========================================== */
/* Esconde o link "Ver carrinho" inline que o WooCommerce adiciona */
.Gstore-product-card .added_to_cart.wc-forward,
.products .added_to_cart.wc-forward,
li.product .added_to_cart.wc-forward,
.woocommerce .added_to_cart.wc-forward {
    display: none !important;
}

/* ==========================================
   RESPONSIVO
   ========================================== */
@media (max-width: 480px) {
    .Gstore-cart-toast {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
        transform: translateY(100%);
    }
    
    .Gstore-cart-toast.is-visible {
        transform: translateY(0);
    }
    
    .Gstore-cart-toast.is-exiting {
        transform: translateY(100%);
    }
    
    .Gstore-cart-toast__image {
        width: 60px;
        height: 60px;
    }
    
    .Gstore-cart-toast__footer {
        flex-direction: column;
    }
    
    .Gstore-cart-toast__btn {
        width: 100%;
    }
}

/* ==========================================
   ANIMAÇÃO DE SHAKE PARA ERRO
   ========================================== */
.Gstore-cart-toast.is-error {
    animation: shake 0.5s ease-in-out;
}

.Gstore-cart-toast.is-error .Gstore-cart-toast__icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}








