/**
 * Estilos do Carrinho Flutuante - Guerreiro Shamo
 * Design Dark Gold Premium
 */

/* ===== BOTÃO FLUTUANTE ===== */
.floating-cart-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #d4a574, #b8935a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212, 165, 116, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0);
    opacity: 0;
}

.floating-cart-button.animated {
    transform: scale(1);
    opacity: 1;
    animation: bounceIn 0.6s ease;
}

.floating-cart-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(212, 165, 116, 0.6), 0 3px 15px rgba(0, 0, 0, 0.4);
}

.floating-cart-button.active {
    background: linear-gradient(135deg, #b8935a, #d4a574);
}

.cart-icon {
    width: 28px;
    height: 28px;
    color: #1a1a1a;
}

/* Badge do Carrinho */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cart-badge.pulse {
    animation: pulse 0.6s ease;
}

/* Pulse effect */
.cart-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(212, 165, 116, 0.3);
    animation: pulseRing 2s infinite;
    pointer-events: none;
}

/* ===== MINI PREVIEW ===== */
.cart-mini-preview {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #1a1a1a;
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.cart-mini-preview.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.preview-content {
    display: flex;
    gap: 15px;
    align-items: center;
    white-space: nowrap;
}

.preview-items {
    color: #999;
    font-size: 0.9rem;
}

.preview-total {
    color: #d4a574;
    font-weight: bold;
    font-size: 1rem;
}

/* ===== PAINEL DO CARRINHO ===== */
.floating-cart-panel {
    position: fixed;
    right: -420px;
    top: 0;
    width: 420px;
    height: 100vh;
    background: #1a1a1a;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(212, 165, 116, 0.2);
}

.floating-cart-panel.open {
    right: 0;
}

.floating-cart-panel.minimized {
    height: 60px;
    top: auto;
    bottom: 100px;
}

/* Header do Carrinho */
.cart-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), rgba(184, 147, 90, 0.05));
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.cart-header-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #d4a574;
    font-weight: 600;
}

.cart-header-count {
    font-size: 0.85rem;
    color: #999;
}

.cart-header-actions {
    display: flex;
    gap: 8px;
}

.cart-header button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-header button:hover {
    background: rgba(212, 165, 116, 0.1);
    border-color: rgba(212, 165, 116, 0.3);
    color: #d4a574;
}

/* Container de Items */
.cart-items-container {
    flex: 1;
    overflow-y: auto;
    background: #0d0d0d;
}

.cart-items {
    padding: 15px;
}

/* Item do Carrinho */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: rgba(42, 42, 42, 0.5);
    border: 1px solid rgba(68, 68, 68, 0.3);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.cart-item:hover {
    background: rgba(42, 42, 42, 0.8);
    border-color: rgba(212, 165, 116, 0.2);
    transform: translateX(-2px);
}

.cart-item.removing {
    animation: slideOut 0.3s ease forwards;
    opacity: 0;
}

.item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: #2a2a2a;
    flex-shrink: 0;
}

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

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-details h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #d4a574;
    font-weight: 500;
    line-height: 1.3;
}

.item-meta {
    font-size: 0.8rem;
    color: #888;
}

.item-tier,
.item-unit {
    background: rgba(212, 165, 116, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.item-price-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.item-price {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.95rem;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 2px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(212, 165, 116, 0.2);
    color: #d4a574;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: rgba(212, 165, 116, 0.3);
    transform: scale(1.1);
}

.qty-value {
    min-width: 20px;
    text-align: center;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
}

.item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}

.cart-item:hover .item-remove {
    opacity: 1;
}

.item-remove:hover {
    color: #ff4444;
    transform: scale(1.2);
}

/* Carrinho Vazio */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.empty-cart p {
    margin: 10px 0;
    font-size: 1.1rem;
    color: #999;
}

.empty-cart span {
    font-size: 0.9rem;
    color: #666;
}

/* Footer do Carrinho */
.cart-footer {
    background: #1a1a1a;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    padding: 20px;
}

/* Resumo */
.cart-summary {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(42, 42, 42, 0.3);
    border-radius: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #999;
    font-size: 0.9rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row.total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    color: #e0e0e0;
    font-size: 1.1rem;
}

.summary-row.total strong {
    color: #d4a574;
}

/* Ações do Carrinho */
.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-actions button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-continue-shopping {
    background: rgba(68, 68, 68, 0.5);
    color: #999;
    border: 1px solid rgba(68, 68, 68, 0.5);
}

.btn-continue-shopping:hover {
    background: rgba(68, 68, 68, 0.8);
    color: #d4a574;
    border-color: rgba(212, 165, 116, 0.3);
}

.btn-view-cart {
    background: rgba(212, 165, 116, 0.1);
    color: #d4a574;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.btn-view-cart:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: rgba(212, 165, 116, 0.5);
}

.btn-checkout {
    background: linear-gradient(135deg, #d4a574, #b8935a);
    color: #1a1a1a;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.btn-checkout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-checkout:hover::before {
    left: 100%;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 165, 116, 0.4);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== NOTIFICAÇÃO ===== */
.cart-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

.cart-notification.show {
    right: 30px;
    animation: slideInBounce 0.5s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-text strong {
    font-size: 0.95rem;
}

.notification-details {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ===== OVERLAY ===== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9997;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ===== ANIMAÇÕES ===== */
@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInBounce {
    0% {
        transform: translateX(100%);
    }
    60% {
        transform: translateX(-10px);
    }
    100% {
        transform: translateX(0);
    }
}

/* ===== SCROLLBAR CUSTOMIZADA ===== */
.cart-items-container::-webkit-scrollbar {
    width: 6px;
}

.cart-items-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.cart-items-container::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.3);
    border-radius: 3px;
}

.cart-items-container::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 165, 116, 0.5);
}

/* ===== RESPONSIVO MOBILE ===== */
@media (max-width: 768px) {
    .floating-cart-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .cart-icon {
        width: 24px;
        height: 24px;
    }
    
    .floating-cart-panel {
        width: 100%;
        right: -100%;
    }
    
    .cart-mini-preview {
        display: none;
    }
    
    .cart-notification {
        right: -100%;
        left: 20px;
        right: 20px;
        width: auto;
    }
    
    .cart-notification.show {
        right: 20px;
        left: 20px;
    }
    
    .cart-item {
        padding: 12px;
    }
    
    .item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-actions {
        flex-direction: column-reverse;
    }
    
    .btn-continue-shopping {
        display: none;
    }
}

@media (max-width: 480px) {
    .floating-cart-button {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .cart-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -3px;
        right: -3px;
    }
}

/* ===== UTILITÁRIOS ===== */
.no-scroll {
    overflow: hidden;
}

/* Font Awesome fallback */
.floating-cart-widget [class*="fa-"]:before {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
}