/* Carrinho Sidebar */
#cartSidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#cartSidebar.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
}

#cartSidebar.active ~ .cart-overlay,
.cart-overlay.active {
    display: block;
}

.cart-header {
    background: #4b2a1a;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.cart-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close:hover {
    opacity: 0.8;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.cart-item-pricing {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #28a745;
}

.cart-item-discount {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-qty-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-qty-btn:hover {
    background: #e0e0e0;
}

.cart-qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-remove {
    color: #dc3545;
    font-size: 12px;
    text-decoration: none;
    margin-left: auto;
}

.cart-remove:hover {
    text-decoration: underline;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.cart-total-price {
    color: #333;
    font-size: 20px;
}

.cart-checkout-btn {
    width: 100%;
    background: #4b2a1a;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.cart-checkout-btn:hover {
    background: #6b3f2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(75, 42, 26, 0.3);
}

.cart-continue-btn {
    width: 100%;
    background: #fff;
    color: #4b2a1a;
    border: 1px solid #4b2a1a;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.cart-continue-btn:hover {
    background: #f5f5f5;
}

/* Badge do carrinho no header */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b35;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.cart-toggle {
    position: relative;
}

/* Responsivo */
@media (max-width: 768px) {
    #cartSidebar {
        max-width: 100%;
    }
}
