/* ===== CARRINHO REESTILIZADO ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: linear-gradient(150deg, #111, #0b0b0b);
    border-left: 1px solid rgba(255, 50, 50, 0.35);
    box-shadow: -6px 0 40px rgba(255, 0, 0, 0.18);
    transition: right 0.35s cubic-bezier(.4, 0, .2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.4);
}

.cart-header h3 {
    margin: 0;
    color: white;
    font-size: 1.25rem;
    letter-spacing: .5px;
}

.close-cart {
    background: none;
    border: none;
    color: #ff5151;
    font-size: 1.6rem;
    cursor: pointer;
    transition: .25s;
}

.close-cart:hover {
    color: #ff7979;
    text-shadow: 0 0 12px rgba(255, 50, 50, 0.6);
}

/* Scroll estilizado */
.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
    scrollbar-width: thin;
    scrollbar-color: #ff3d3d #1b1b1b;
}
.cart-content::-webkit-scrollbar {
    width: 8px;
}
.cart-content::-webkit-scrollbar-thumb {
    background: #ff3d3d;
    border-radius: 5px;
}
.cart-content::-webkit-scrollbar-track {
    background: #1b1b1b;
}

.cart-empty {
    text-align: center;
    color: #777;
    padding: 3rem 1rem;
}
.cart-empty i {
    font-size: 3.3rem;
    margin-bottom: 0.7rem;
    opacity: 0.45;
}

.cart-item {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.25s;
}
.cart-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 60, 60, 0.6);
    box-shadow: 0 0 12px rgba(255, 60, 60, 0.12);
}

.item-image {
    width: 62px;
    height: 62px;
    background: linear-gradient(45deg, #ff3d3d, #ff6b6b);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}
.item-image i {
    color: white;
    font-size: 1.55rem;
}

.item-name {
    font-weight: 700;
    color: white;
    margin-bottom: .25rem;
    letter-spacing: .3px;
}
.item-meta {
    font-size: 0.8rem;
    color: #b5b5b5;
    margin-bottom: 0.4rem;
}
.item-price {
    font-weight: 600;
    color: #ff4c4c;
    font-size: 1rem;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .55rem;
}
.quantity-btn {
    background: rgba(255, 255, 255, 0.09);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .25s;
}
.quantity-btn:hover {
    background: rgba(255, 60, 60, 0.4);
}
.remove-item {
    background: rgba(255, 35, 35, 0.18);
    border: none;
    color: #ff8080;
    padding: .3rem .55rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: .8rem;
    transition: .25s;
}
.remove-item:hover {
    background: rgba(255, 60, 60, 0.35);
    color: white;
}

.cart-footer {
    padding: 1.3rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.45);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: .45rem;
    color: #d6d6d6;
}
.summary-row.total {
    font-weight: 700;
    font-size: 1.15rem;
    color: white;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: .45rem;
}

#applyCoupon {
    background: #5865F2;
    border: none;
    color: white;
    padding: .55rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: .25s;
}
#applyCoupon:hover {
    opacity: .85;
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, #ff3d3d, #ff6b6b);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    transition: .3s;
}
.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 16px rgba(255, 45, 45, 0.45);
}

/* Botão flutuante */
.cart-floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ff3d3d, #ff6b6b);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.55rem;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(255, 50, 50, 0.45);
    z-index: 999;
    transition: .3s;
}
.cart-floating-btn:hover {
    transform: scale(1.14);
    box-shadow: 0 0 32px rgba(255, 45, 45, 0.65);
}

/* Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.68);
    z-index: 998;
    display: none;
    backdrop-filter: blur(2px);
}
.cart-overlay.active {
    display: block;
}

/* Responsividade */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }
    .cart-floating-btn {
        bottom: 1rem;
        right: 1rem;
        width: 52px;
        height: 52px;
        font-size: 1.25rem;
    }
}

/* Ícone da NAV */
#cartNavBtn i {
    font-size: 1.25rem;
    color: white;
    transition: .28s;
}
#cartNavBtn:hover i {
    color: #ff3b3b;
    text-shadow: 0 0 8px rgba(255, 45, 45, 0.9);
}

/* Contador da NAV */
.cart-nav-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ff0000;
    color: black;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.6);
}
