/* Correções do Carrinho - Mundo Pelúcias */

/* Corrigir layout dos itens do carrinho */
.woocommerce-mini-cart > li {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 15px !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce-mini-cart > li:last-child {
    border-bottom: none;
}

/* Botão de remover (X) - posicionamento correto */
.woocommerce-mini-cart .remove,
.woocommerce-mini-cart .remove_from_cart_button {
    position: absolute !important;
    top: 15px !important;
    right: 0 !important;
    z-index: 10 !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background-color: #f5f5f5 !important;
    color: transparent !important;
    text-align: center !important;
    line-height: 24px !important;
    font-size: 0 !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

/* Esconder todo o conteúdo original */
.woocommerce-mini-cart .remove *,
.woocommerce-mini-cart .remove_from_cart_button * {
    display: none !important;
}

/* Adicionar apenas um X via CSS */
.woocommerce-mini-cart .remove:after,
.woocommerce-mini-cart .remove_from_cart_button:after {
    content: '×' !important;
    font-size: 20px !important;
    color: #666 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    line-height: 1 !important;
    display: block !important;
}

.woocommerce-mini-cart .remove:hover,
.woocommerce-mini-cart .remove_from_cart_button:hover {
    background-color: #ff4444 !important;
    transform: scale(1.1) !important;
}

.woocommerce-mini-cart .remove:hover:after,
.woocommerce-mini-cart .remove_from_cart_button:hover:after {
    color: white !important;
}

/* Imagem do produto */
.cart-item-image {
    flex: 0 0 60px !important;
    width: 60px !important;
    height: 60px !important;
    margin-right: 15px !important;
    overflow: hidden;
    border-radius: 8px;
}

.cart-item-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Informações do produto */
.cart-info {
    flex: 1 1 auto !important;
    padding-right: 35px !important;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-info .wd-entities-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.4 !important;
    margin-bottom: 5px !important;
}

.cart-info .quantity {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 13px !important;
    color: #666 !important;
}

.cart-info .quantity .woocommerce-Price-amount {
    font-weight: 600 !important;
    color: #2ecc71 !important;
}

/* Subtotal do carrinho */
.woocommerce-mini-cart__total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px !important;
    margin: 15px 0 !important;
    border-top: 2px solid #e0e0e0 !important;
    border-bottom: 2px solid #e0e0e0 !important;
}

.woocommerce-mini-cart__total strong {
    font-size: 16px !important;
    color: #333 !important;
}

.woocommerce-mini-cart__total .woocommerce-Price-amount {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #2ecc71 !important;
}

/* Botões do carrinho - mais compactos e arredondados */
.woocommerce-mini-cart__buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 15px !important;
    padding: 0 15px !important;
}

.woocommerce-mini-cart__buttons a,
.woocommerce-mini-cart__buttons .button {
    width: 100% !important;
    padding: 14px 20px !important;
    border-radius: 25px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

/* Botão Ver Carrinho */
.woocommerce-mini-cart__buttons .btn-cart,
.woocommerce-mini-cart__buttons a[href*="carrinho"]:not(.checkout) {
    background-color: #f8f9fa !important;
    color: #333 !important;
    border: 2px solid #dee2e6 !important;
}

.woocommerce-mini-cart__buttons .btn-cart:hover,
.woocommerce-mini-cart__buttons a[href*="carrinho"]:not(.checkout):hover {
    background-color: #e9ecef !important;
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Botão Finalização de Compra */
.woocommerce-mini-cart__buttons .checkout,
.woocommerce-mini-cart__buttons a[href*="finalizar-compra"] {
    background: #3EA7FF !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(62, 167, 255, 0.4) !important;
}

.woocommerce-mini-cart__buttons .checkout:hover,
.woocommerce-mini-cart__buttons a[href*="finalizar-compra"]:hover {
    background: #2a95ef !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 167, 255, 0.6) !important;
}

/* Carrinho vazio */
.woocommerce-mini-cart__empty-message {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #999 !important;
    font-size: 14px !important;
}

/* Sistema de notificações */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.4s ease;
    border-left: 4px solid #2ecc71;
}

.cart-notification.removing {
    border-left-color: #e74c3c;
}

.cart-notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cart-notification-content {
    flex: 1;
}

.cart-notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.cart-notification-message {
    font-size: 13px;
    color: #666;
}

.cart-notification-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-notification-close:hover {
    background: #e0e0e0;
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.cart-notification.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

/* Responsivo */
@media (max-width: 768px) {
    .cart-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .cart-info {
        padding-right: 30px !important;
    }
    
    .woocommerce-mini-cart .remove {
        width: 20px !important;
        height: 20px !important;
        line-height: 20px !important;
        font-size: 14px !important;
    }
}
