.cart-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: var(--transition);
}

html[dir="rtl"] .cart-sidebar {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
}

.cart-sidebar.active {
    transform: translateX(0);
}

html[dir="rtl"] .cart-sidebar.active {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--light-bg);
}

.cart-item-remove {
    color: var(--danger-color);
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

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