/* ==================================================
   BARRA FIXA NO RODAPÉ - PC E MOBILE
   Compacta, sempre visível, moderna
   ================================================== */

.footer-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUpCart 0.4s ease-out;
}

@keyframes slideUpCart {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.footer-cart-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    gap: 20px;
}

.footer-cart-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.footer-cart-summary:hover {
    opacity: 0.9;
}

.footer-cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-cart-icon {
    width: 32px;
    height: 32px;
    color: #fff;
    stroke-width: 2.5;
}

.footer-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
    animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.footer-cart-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-cart-count {
    color: #d1d5db;
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-cart-total {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.footer-cart-expand-icon {
    width: 24px;
    height: 24px;
    color: #9ca3af;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.footer-cart.expanded .footer-cart-expand-icon {
    transform: rotate(180deg);
}

.footer-checkout-btn {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-checkout-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.footer-checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
    background: linear-gradient(135deg, #db2777 0%, #9f1239 100%);
}

.footer-checkout-btn:hover:not(:disabled) svg {
    transform: translateX(4px);
}

.footer-checkout-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.footer-checkout-btn:disabled {
    background: #4a4a4a;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

/* Lista expandida de itens */
.footer-cart-items {
    max-width: 1200px;
    margin: 0 auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    padding: 0 24px;
    background: rgba(0, 0, 0, 0.2);
}

.footer-cart.expanded .footer-cart-items {
    max-height: 400px;
    padding: 16px 24px 20px;
    overflow-y: auto;
}

.footer-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.footer-cart-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.footer-cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-cart-item-name {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-cart-item-price {
    color: #d1d5db;
    font-size: 0.85rem;
}

.footer-cart-item-remove {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.footer-cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
    transform: scale(1.1);
}

.footer-cart-items::-webkit-scrollbar {
    width: 8px;
}

.footer-cart-items::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.footer-cart-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.footer-cart-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile: ajustes para telas pequenas */
@media (max-width: 600px) {
    .footer-cart-content {
        padding: 16px 20px;
        gap: 12px;
    }
    
    .footer-cart-icon {
        width: 28px;
        height: 28px;
    }
    
    .footer-cart-badge {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
        top: -6px;
        right: -6px;
    }
    
    .footer-cart-count {
        font-size: 0.75rem;
    }
    
    .footer-cart-total {
        font-size: 1.3rem;
    }
    
    .footer-cart-expand-icon {
        width: 20px;
        height: 20px;
    }
    
    .footer-checkout-btn {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
    
    .footer-checkout-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .footer-cart-items {
        padding: 0 20px;
    }
    
    .footer-cart.expanded .footer-cart-items {
        padding: 12px 20px 16px;
        max-height: 300px;
    }
    
    .footer-cart-item {
        padding: 10px;
        gap: 10px;
    }
    
    .footer-cart-item-name {
        font-size: 0.9rem;
    }
    
    .footer-cart-item-price {
        font-size: 0.8rem;
    }
}

/* Padding no body para evitar que conteúdo fique sob a barra */
body {
    padding-bottom: 75px;
}

@media (max-width: 600px) {
    body {
        padding-bottom: 70px;
    }
}

